Page 2 of 2
Re: Wrong format?
Posted: Sun Apr 21, 2024 6:58 am
by user0
alee001 wrote: Sun Apr 21, 2024 5:50 am
For example, a batch of PNG files were renamed in batches, but the extension in the settings was incorrect/forgot to be corrected to *.png (*.jpg was used).
this is a user problem, not an application problem
alee001 wrote: Sun Apr 21, 2024 5:50 am
As a result, the format (color) of the resulting PNG files did not change but was incorrectly marked as JPG, don't you think that's a problem?
format color is determined by evaluating
'signatures' in file header, not file extension
Re: Wrong format?
Posted: Sun Apr 21, 2024 8:37 pm
by abobong
Is the summary of the question: "[Even though the file extension was renamed from jpg to png], why does the format color displayed on the browser not change from #EDEDCA (for jpg) to #E8DEDC (for png)?"
Yes, is this a question, right?
Re: Wrong format?
Posted: Mon Apr 22, 2024 6:08 am
by alee001
user0 wrote: Sun Apr 21, 2024 6:58 am
alee001 wrote: Sun Apr 21, 2024 5:50 am
For example, a batch of PNG files were renamed in batches, but the extension in the settings was incorrect/forgot to be corrected to *.png (*.jpg was used).
this is a user problem, not an application problem
alee001 wrote: Sun Apr 21, 2024 5:50 am
As a result, the format (color) of the resulting PNG files did not change but was incorrectly marked as JPG, don't you think that's a problem?
format color is determined by evaluating
'signatures' in file header, not file extension
File properties should not change its extension under non-conversion format settings, just like if there is software that defaults to the user's ISO file setting to change its extension to RAR, ZIP, etc. to open it.
Re: Wrong format?
Posted: Mon Apr 22, 2024 3:33 pm
by abobong
alee001
The file name has only been changed, so it is a leap to assume that the codec has been converted.
If there is a function to only change the file extension name, then I think it would be useful. Including a result prediction is also very helpful.
If I had to specify an improvement, I think it would be useful to have a rollback function in case of mistakes.
Regarding bug reports, since the answer has already been provided, it would be better to repost as a request going forward.
Re: Wrong format?
Posted: Tue Apr 23, 2024 3:28 am
by alee001
abobong wrote: Mon Apr 22, 2024 3:33 pm
alee001
The file name has only been changed, so it is a leap to assume that the codec has been converted.
If there is a function to only change the file extension name, then I think it would be useful. Including a result prediction is also very helpful.
If I had to specify an improvement, I think it would be useful to have a rollback function in case of mistakes.
Regarding bug reports, since the answer has already been provided, it would be better to repost as a request going forward.
After the PNG images are renamed in batches and the extension is set to JPG, it can be seen from the image color format and metadata that the image is not a real JPG format, it is still a PNG.
Compared with converting to JPG format, the image size will be much larger.
Re: Wrong format?
Posted: Tue Apr 23, 2024 6:48 am
by user0
looks like it's a bit more complicated and extension is evaluated as well
though, not sure why custom extension overcomes file signature as it does not happen with preset extensions
(see jpg_w_png_ext.png and png_w_jpg_ext.png files)

- settings_format_color.png (5.84 KiB) Viewed 678 times