Why I Love .PNG Files And Hate .JPG Files For Important Scans.

K'Tesh

OpenRocket Chuck Norris
TRF Supporter
Joined
Mar 27, 2013
Messages
20,138
Reaction score
11,091
Here's an image I made of black letters in a red field (RGB values: 237, 28, 36)... On the left I saved it as a .png file, then expanded the image, closed and reopened the file, then copied the results below it, and tried to change the red to black. On the right, I did the same thing as a .jpg file, then I combined the results into one .png file. Hmm, I wonder which red is more faithful to the original image? The .png or the .jpg?

1645531420795.png

Then there's mostly text on a white background... upper text is .png, lower is .jpg. When I clicked to change the background of the .jpg's white to red, the spot indicated by the black arrow was the only thing that changed. The black outlined white arrow is the approximate location of my second attempt to flood fill the .jpg with red (as you can see it spilled over into the first part of the .jpg text area.

1645532508200.png

Don't get me wrong. JPG files are fine for photographs of things that are not a single color (the sky, birds, a family photo), but when it comes to things that have a single color (such as a band of color that goes around a model rocket, applied as a decal, it's not good, and if any upscaling is involved, it gets significantly worse. Ideally when it comes to text, vectored graphics would be the best, but IMHO .PNG files are adequate.
 

Funkworks

Low Earth Orbit, obstructing Earth's view of Venus
Joined
Jul 28, 2018
Messages
3,731
Reaction score
3,855
I also have to make choices like this. I think JPG is mostly when you need to save memory space and details aren't as important.

 

manixFan

Not a rocket scientist
Joined
Feb 15, 2009
Messages
2,523
Reaction score
1,707
Location
TX
TLDR; JPEG was designed for continuous tone images with smooth or subtle variations in color and tone, and is TERRIBLE for any images with high contrast images, such as a decals or instructions. Worse, it is a 'lossy' form of compression, meaning detail is lost due to the compression scheme and can not be easily recovered. Basically the wrong format for any kind of a flat art or text and black and white drawings.

PNG was designed to easily handle high contrast edges and still be efficient. It is also lossless, so no detail or information is lost when the image is saved. Most decal and instructions can be saved as 8-bit images without alpha channels and will be 'perfect' representations of the original scan, unlike a JPG, which will have a lot of added noise, and oftentimes will be larger.

Photo = JPG (JPG smaller, PNG larger)
Line Art (solid colors) = PNG (PNG smaller, JPG larger)


Tony
 

boatgeek

Well-Known Member
Joined
Dec 27, 2014
Messages
4,955
Reaction score
4,089
JPG also tends to scatter black pixels around when you print a black/white image (like text or, say, a signature image) while PNG doesn't.
 

dr wogz

Fly caster
Joined
Feb 5, 2009
Messages
8,355
Reaction score
4,035
Location
Land of Poutine!
Of courser, I prefer vector file formats for graphics, vs, the 'standard' raster image files.. for exactly this reason!
 

manixFan

Not a rocket scientist
Joined
Feb 15, 2009
Messages
2,523
Reaction score
1,707
Location
TX
Of courser, I prefer vector file formats for graphics, vs, the 'standard' raster image files.. for exactly this reason!
Since K'Tesh deals mostly with scans of old kits, vector formats won't work here, unless you are taking scans into a program like Illustrator and converting them. As I'm sure you know, scans are raster images files. In the 'olden' days before PNG became popular, TIFF file format was the best format for a lossless scan, and is still used a lot because it is so much more flexible than PNG. (It can save layers for example.) For many scans, I still use TIFF since I can have both the original scan and a cleaned up version, and/or even a color and converted black and white version in one file.

Unfortunately, there isn't a single best file format, as it really depends on the content and intent of the file. And of course trying to scan something like a magazine page with text and photos makes it even more difficult, because for best results, each area needs to be handled separately, unless you are willing to deal with huge file sizes.


Tony
 
Top