BUG - FileOptimizer - .PNG file: 1-BIT Converted To 8-Bits
Javier Gutiérrez Chamorro (Guti) Open source projects
Brought to you by:
nikkho
1-BIT PNG Files (2 colours) are converted to 8-BITS.
This maybe undesirable for their intended usage requires 1-BIT files.
Can you have option to ONLY convert bits HIGHER if the option is enabled, Also give warnings/logs that this conversion has happened.
This is for Version 13.x (can you move it to tha MileStone) and delete THIS message
I can implement that, but it would be a custom code. Being FO a only a frontend, I will expecting plugin/tools reporting a warning or error, and so FO could raise it too.
Then I guess you should following it up with the other Tools authors to negotiate a reporting protocol which you can use. Or create an option that needs to be enabeld for the conversion to occur.
Thanks, I will add it to my ToDo list, even thought my priority is bug fixing, support, and then new features.
If you are happy, please, consider making a donation:
https://nikkhokkho.sourceforge.io/images/FileOptimizerDonate.html
was it lossless mode?
Yes. LossLESS.
can you provide sample file?
Attached is Before and After.
Note I used Photoshop to load the After file, and it was a 8-bit indexed colour file. Some other programs that are just viewers, report it as 1-Bit but that is probably because only 2 colours are used in the image.
yes ,2 colors with 2 runs on Fast mode (and yes your source 1bit greyscale file becomes 1 bit pallete file) - so I think Photoshop processes this kind of file incorrectly? It
s not FO bug but Photoshop
s IMHO.Last edit: necros 2020-07-31
No....
The color type. fileld in the file header is being modified from 0 (GrayScale) to 3 (Indexed channel containing indices into a palette of colors) . The26th byte in this particular file.
You can test it out by using a hex editor and changing the 26th byte back to 0 (from 3). There wil be inversion of colours be cause you are not remapping the colour table back. But that is 'proof' that bit-depth is changed.
Last edit: Roger 2020-07-31
File header being modified by what software?
As part of the FileOptimiser's optimisation process. The optimised file has the file header modified (and also some other data).