Wrong format?

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

User avatar
user0
XnThusiast
Posts: 2414
Joined: Sat May 09, 2015 9:37 am

Re: Wrong format?

Post 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
abobong
Posts: 52
Joined: Tue Mar 01, 2016 5:56 am

Re: Wrong format?

Post 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? 

fomat color.png
alee001
Posts: 145
Joined: Sun Sep 04, 2022 4:43 am

Re: Wrong format?

Post 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.
abobong
Posts: 52
Joined: Tue Mar 01, 2016 5:56 am

Re: Wrong format?

Post 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.
alee001
Posts: 145
Joined: Sun Sep 04, 2022 4:43 am

Re: Wrong format?

Post 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.
User avatar
user0
XnThusiast
Posts: 2414
Joined: Sat May 09, 2015 9:37 am

Re: Wrong format?

Post by user0 »

user0 wrote: Sun Apr 21, 2024 6:58 am format color is determined by evaluating 'signatures' in file header, n̶o̶t̶ f̶i̶l̶e̶ e̶x̶t̶e̶n̶s̶i̶o̶n̶
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
settings_format_color.png (5.84 KiB) Viewed 674 times
Post Reply