Jump to content

Can I make JPEG exports preserve all colors?


Recommended Posts

Hi, I'm a long-time user of PDN, but apparently I still have questions about it... I searched previous posts on here and on Google, and had trouble getting a straight answer.

 

The Problem

I am working with a source image that is in PNG format. This image contains a color with the hex code #796F75. Because I must export as JPEG, I am keeping the alpha at 255. Upon saving the image as a JPEG (even with Quality=100, Chroma Subsampling=4:4:4) and reopening the image in PDN, this color has magically transformed itself to #7A6F75. I attached a 16x16 PNG of nothing but #796F75 if you'd like to download and try.

 

Color Profiles?
I see this term come up a lot when Googling around this issue, but I'm not really sure what it has to do with this problem. I found a post on this forum from 2012 that says PDN had no concept of color profiles, and as far as I can tell, sRGB and YCbCr both handle full 24 bit-depth of colors anyways.

 

My Question

Is there a setting I'm missing in PDN, a missing feature, a problem with JPEG, or something else entirely? Is it possible for me to save a JPEG with this exact color?

 

Thanks,

Brandon

 

Edit 1: I'm using paint.net v4.2.12

test.png

Edited by bjf
Link to comment
Share on other sites

True, but does compressing even a 16x16 single-color image mean that the original color value can't be preserved? And regardless of whether or not Facebook modifies the image, is it impossible for this image to exist on my hard drive?

Edited by bjf
Update my question
Link to comment
Share on other sites

Due to the nature of JPG images, some pixel colors are changed (sometimes more than) slightly so that the image compresses better.  Apparently #7A6F75 compresses better than #796F75.  (I have no idea why.)

 

So, if your original intent was to have #7A6F75, then you would have been in luck.  As it is, you want #796F75... so, you are out of luck as it will be changed in order to compress better.  JPG is not good for getting very specific colors.  For that, you should try a lossless format, like PNG. 

 

You could try a palettized format, like GIF... I wonder if FB would accept a GIF file and keep it that format.

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to comment
Share on other sites

It was worth a try, though it doesn't seem like Facebook likes static GIFs right now. Anyways, it sounds like this isn't a paint.net issue, so I'll keep this discussion from going off-topic any further. It sounds like to solve my problem, I'll need to get a better understanding of JPEG compression algorithms to see if I can avoid this issue in the future. For now, thanks for your help!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...