What's new

Specific Please invert the colors of my image without reducing quality


[ iLLuSioN ]

Power User
Messages
263
Likes
278
What do you mean by "invert colors"?
To turn the black color to white and the dark gray color to a light gray?
 
Last edited:

wildcompi

Member
Messages
6
Likes
0
I'm sorry, I forgot to mention the black half circle should be white as well

And if possible, do not change the proportions of the image

Thank you so much
 

[ iLLuSioN ]

Power User
Messages
263
Likes
278
It's a vector graphic, so you can change the color and size by yourself with Inkscape.

This was necessary because your file won't open in PS and AI.
 

thebestcpu

Guru
Messages
2,134
Likes
2,015
No problem @wildcompi we have you covered.

Turns out that even though this is an SVG format image. The reason that there was a lot of difficulty reading it is the SVG construct was actually an embedded PNG file with base64 encoding.
I decoded the construct and opened in Photoshop which was a 2000 px x 2000 px png file with transparency as the background.
So all I did was select the darker portions and inverted those colors and left the blue alone.

I wanted to point out that the blue circle is acutally a subtle gradient and that was preserved. Also the word "FORUM" was acutally not solid black yet almost black. So when inverted, that word is almost white. So just delivering exactly what you requested.

The first image is with a built in background of black so you can see the whole image and the second is the PNG file with transparency so you won't be able to see any letters that are fully white.
If you need something else or adjustments just let me know
John Wheeler
ADDED EDIT: I REPLACED BOTH FILES BECAUSE I SAW A FEW PIXELS OF OFF COLOR NOISE THAT I REMOVED - FYI

Invert-Logo-with-black-background.png

Text here so you know the location of the top boundary of the transparent image
Invert-Logo-with-transparency.png
text put here to mark the lower boundary of the transparent image.
 
Last edited:

JeffK

Guru
Messages
1,441
Likes
1,673
......
Turns out that even though this is an SVG format image. The reason that there was a lot of difficulty reading it is the SVG construct was actually an embedded PNG file with base64 encoding.
I decoded the construct and opened in Photoshop
.....
Hi John -
The unzipped file opened to a blank document in PS and same thing when I tried to open in Inkscape.
Could you explain how you decoded and opened in PS?
- Jeff
 

thebestcpu

Guru
Messages
2,134
Likes
2,015
Hi @JeffK and @polarwoc and IamSam

I was having the exact same trouble as you were so went poking around to see what was up. I have not encountered this problem before and I am certainly no expert on SVG so I will explain my steps yet there certainly could be an easier way since I was learning as I went along.

Since it was mentioned the SVG could be seen in a browser, one of the steps I took was to right click on the image and chose the "Inspect option" (I did this in Firefox yet should work in Chrome too at least). Here is the screen shot:

Screen Shot 2021-10-17 at 3.23.31 PM.jpg
The above is the HTML code that displayed the logo. I was not sure what the "matrix" command was a couple lines up until later yet the highlight line indicated that the image was a PNG and with a base64 encoding. I recognized the base64 encoding as a way to send binary information only with ASCII characters and was often used in sending binary information in emails (probably other places as well such as in HTML code."

I was unware about the possibility of embedding bit map images in SVG yet a quick Google search indicated it was quite possible to do. So with that confirmation I assumed this was an embedded PNG file.
From a recently learning elsewhere, I riight clicked on the highlighted line, chose the Copy menu item and chose the "Outer HTML option" and then pasted in a local text editor. Sure enough it was exactly the same as what was highlighted yet the coding was fully expanded (quite long.

Then searched for an easy way to translate the ASCII code back in to a PNG file format. I knew I could do that with UNIX commands yet was going for a simpler path. Google search found the following link that would translate the ASCII text into a file format: Link to Convert base64 to File

I copied and pasted the text from my text editor and trimmed a bit from the end and the front to just have the ASCII text and presto, it created a PNG file that I could download. And as advertised it was 2000 x 2000 pixels in dimensions.

From there, I just brought it into Photoshop and it had a transparent background ready to go. I selected the darker elements (with a high tolerance setting to get all but the blue circle) and added an Invert adjustment Layer so it inverted just the darker elements.

Now that is not what shows on the web page and looked up what the Matrix command did in HTML and it was scaling and traanslating the position so it would be smaller and fit in the upper left corner of the display. I did not make those adjustments or crop the image to match what was on the screen and just left it at its highest resolution since the OP wanted highest quality.

So a learning experience for me.

Now as an aside, there was some part of the HTML that I did not understand when I clicked on the portion that said "script". I will copy that below yet had a bit of information that seemed to be about geo-location. I would have to ask someone what that is all about as beyond my pay grade (so will go ask my son in the next room and let you know what I find out. Hope its not concerning.

--------------------------script below from HTML------------------------------------

I edited out the script and HTML as that was only inserted by my VPN browser extension and unrelated to this post
 
Last edited:

thebestcpu

Guru
Messages
2,134
Likes
2,015
Just as an update, with a bit of help from my son and looking on the internet. That inserted code/script will only show up on a persons system if they have a particular VPN extension added on to their browser (which I did). When I turn off the extension, that script does not show up when I inspect the HTML.

As part of that search though, I did find that Javascript can be embedded into SVG files so that seems like a potential security risk if the web site is not screening that out so I will tag @IamSam for his consideration about this when SVG files are uploaded to the site.

An interesting exercise overall
John Wheeler
 

JeffK

Guru
Messages
1,441
Likes
1,673
@thebestcpu - this went right down to the microscopic level. Can't say that I completely understand it but understand the driven curiosity.
The zip file did give me pause though since they send up red flags for me - but decided to go for it when [ iLLuSioN ] got into the file with no issue.
I'm amazed by your talents - thanks for the roll out!
- Jeff
 

thebestcpu

Guru
Messages
2,134
Likes
2,015
@thebestcpu - this went right down to the microscopic level. Can't say that I completely understand it but understand the driven curiosity.
You're welcome @JeffK. Definitely, have the curiosity and enjoy solving puzzles and sometimes it works and sometimes it doesn't . A bit of fun when an answer drops out of the sky into your lap after poking around a bit :)
 

polarwoc

Guru
Messages
1,412
Likes
1,206
So a learning experience for me.
Thank you so much for the detailed explanation, John. That demonstrated how structured and logical your thinking is. Very helpful to not only learn your findings but also the approach you followed. I was able to open the SVG file in Internet Explorer, but PS/AI opened a blank transparency.
Inspired with your experiences, I opened the file in Firefox, viewed the image, right clicked to select Page Source. Following is the result:
1.png
When I hovered over the link, the mouse pointer turned into a hand, indicating a clickable link. I clicked on it to surprisingly see the full 2000 X 2000 Px resolution image.
However, when I Right Click on the image and save it, the picture saves as a PNG with transparent background and the rest of the logo is all one composite unit.
---------------------------------------------------
Here is where my failed experiment ends.
---------------------------------------------------
 

Top