Wrong format?

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

Moderators: helmut, XnTriq, xnview, Dreamer

alee001
Posts: 145
Joined: Sun Sep 04, 2022 4:43 am

Wrong format?

Post by alee001 »

I found that after renaming the png format pictures in batches, they would be incorrectly displayed as jpg format pictures, but the format colors would be different.

The strange thing is that the pictures that are incorrectly displayed as jpg format are all in jpg format in File Explorer, but their size is png size, which is obviously a bug?

P.S. ver1.6.5 64 bit Windows
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Wrong format?

Post by xnview »

you means that after renaming a png into .jpg, the display is not the same?
Pierre.
alee001
Posts: 145
Joined: Sun Sep 04, 2022 4:43 am

Re: Wrong format?

Post by alee001 »

xnview wrote: Fri Mar 01, 2024 10:26 am you means that after renaming a png into .jpg, the display is not the same?
As you can see in the picture, after renaming several png images in batches, the extension name should be the default original image format(i.e. png), but it will always be set to jpg format (even though it can be changed).

If the output is in jpg format by default, but the renamed file is still in png format color (not jpg color), the size is the same as the original image.

I just want to change the original image file name in batches, why does it change to a format change? :(
Attachments
螢幕擷取畫面 2024-03-02 000537.png
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Wrong format?

Post by xnview »

alee001 wrote: Fri Mar 01, 2024 4:28 pm I just want to change the original image file name in batches, why does it change to a format change? :(
Sorry but i don't understand, you need to keep same extension
Pierre.
alee001
Posts: 145
Joined: Sun Sep 04, 2022 4:43 am

Re: Wrong format?

Post by alee001 »

xnview wrote: Sat Mar 02, 2024 8:18 am
alee001 wrote: Fri Mar 01, 2024 4:28 pm I just want to change the original image file name in batches, why does it change to a format change? :(
Sorry but i don't understand, you need to keep same extension
Right. The setting of batch name change does not require extension and format change at all.
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Wrong format?

Post by michel038 »

In your screenshot, Extension is ticked, with jpg ....
XnViewMP will therefore replace any extension (png ...) with jpg in the photo name, but the file format will not be changed.

You can use this option with "png" parameter to repair badly renamed photos.
And uncheck this option for future use.
alee001
Posts: 145
Joined: Sun Sep 04, 2022 4:43 am

Re: Wrong format?

Post by alee001 »

michel038 wrote: Sat Mar 02, 2024 4:27 pm In your screenshot, Extension is ticked, with jpg ....
XnViewMP will therefore replace any extension (png ...) with jpg in the photo name, but the file format will not be changed.

You can use this option with "png" parameter to repair badly renamed photos.
And uncheck this option for future use.
The problem is that after replacing png with jpg, the color of the classification format will be wrong.

When renaming a batch, the original format should be retained and no changes are necessary.
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Wrong format?

Post by michel038 »

"Batch rename" cannot change format , ( neither displayed format color i suppose)

In Batch rename, "Extension" field is used if one wants to replace jpg by JPG for example.
(or another example, to rename photo-jpg-001.jpg >> to >> photo-001.jpg by replacing "jpg" string and preserve jpg extension)

I tried :
Rename test.jpg to test.png ... this photo keeps it's original color (light yellow jpg) because it's a jpg photo. Even if it's extension name is png.
Rename the same photo from test.png to test.jpg ... still same color light yellow like other jpg's

Perhaps the option : Settings > File list > "Recognize only by extension" may change this behaviour, i didn't try it
alee001
Posts: 145
Joined: Sun Sep 04, 2022 4:43 am

Re: Wrong format?

Post by alee001 »

michel038 wrote: Sat Mar 02, 2024 6:00 pm "Batch rename" cannot change format , ( neither displayed format color i suppose)

In Batch rename, "Extension" field is used if one wants to replace jpg by JPG for example.
(or another example, to rename photo-jpg-001.jpg >> to >> photo-001.jpg by replacing "jpg" string and preserve jpg extension)

I tried :
Rename test.jpg to test.png ... this photo keeps it's original color (light yellow jpg) because it's a jpg photo. Even if it's extension name is png.
Rename the same photo from test.png to test.jpg ... still same color light yellow like other jpg's

Perhaps the option : Settings > File list > "Recognize only by extension" may change this behaviour, i didn't try it

Changing *.jpg to *.JPG may just be necessary for appearance, but in fact they are all in the same format.

Photo-jpg-001.jpg can be changed to photo-001.jpg to use the photo-### format, which should have nothing to do with the extension.

The picture below shows the color error after renaming the batch and using png to jpg:
Attachments
螢幕擷取畫面 2024-03-03 133957 拷貝.png
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Wrong format?

Post by michel038 »

I'm not sure I can understand ...
Or my explanation was not clear because of translation

In your first screenshot , before renaming, c1 and d1 were png photos.
In the 2nd screenshot, I can see c1.png and d1.png are pink (png color) . Right
And hh0001.jpg and hh0002.jpg are pink : that means their name is wrong, these files are png files. That's the problem.


If you only want to rename photos without changing format or extension, use batch rename without the extension "jpg" option ...
I just want to change the original image file name in batches, why does it change to a format change?
ren1.jpg
ren1.jpg (59.86 KiB) Viewed 2073 times
.
.
But now the wrong names ,( because jpg extension was used) are : hh0001.jpg and hh0002.jpg
You must do the reverse renaming : rename with "png" extension to repair ...
hh0001.jpg will become hh0001.png

---

To convert png files into jpg, use "batch convert", they will get yellow color corresponding to jpg format.
alee001
Posts: 145
Joined: Sun Sep 04, 2022 4:43 am

Re: Wrong format?

Post by alee001 »

michel038 wrote: Mon Mar 04, 2024 7:12 pm I'm not sure I can understand ...
Or my explanation was not clear because of translation

In your first screenshot , before renaming, c1 and d1 were png photos.
In the 2nd screenshot, I can see c1.png and d1.png are pink (png color) . Right
And hh0001.jpg and hh0002.jpg are pink : that means their name is wrong, these files are png files. That's the problem.


If you only want to rename photos without changing format or extension, use batch rename without the extension "jpg" option ...
I just want to change the original image file name in batches, why does it change to a format change?
ren1.jpg
.
.
But now the wrong names ,( because jpg extension was used) are : hh0001.jpg and hh0002.jpg
You must do the reverse renaming : rename with "png" extension to repair ...
hh0001.jpg will become hh0001.png

---

To convert png files into jpg, use "batch convert", they will get yellow color corresponding to jpg format.
As I said and you understand, converting the format within the batch rename will give the wrong colors, but the batch conversion will be correct.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Wrong format?

Post by xnview »

alee001 wrote: Tue Mar 05, 2024 4:08 pm As I said and you understand, converting the format within the batch rename will give the wrong colors, but the batch conversion will be correct.
but you can't convert format in batch rename, format will be always the same
Pierre.
alee001
Posts: 145
Joined: Sun Sep 04, 2022 4:43 am

Re: Wrong format?

Post by alee001 »

xnview wrote: Tue Mar 05, 2024 4:12 pm
alee001 wrote: Tue Mar 05, 2024 4:08 pm As I said and you understand, converting the format within the batch rename will give the wrong colors, but the batch conversion will be correct.
but you can't convert format in batch rename, format will be always the same
However, batch renaming allows users to choose to change the extension, which results in incorrect formatting and color.
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Wrong format?

Post by michel038 »

I can rename the jpg photo DSC30091.JPG to Abcdef.ghij (or, more conventionally, the opposite :D ). It's still a photo in jpg format, whatever its name.
alee001
Posts: 145
Joined: Sun Sep 04, 2022 4:43 am

Re: Wrong format?

Post by alee001 »

michel038 wrote: Mon Mar 04, 2024 7:12 pm I'm not sure I can understand ...
Or my explanation was not clear because of translation

In your first screenshot , before renaming, c1 and d1 were png photos.
In the 2nd screenshot, I can see c1.png and d1.png are pink (png color) . Right
And hh0001.jpg and hh0002.jpg are pink : that means their name is wrong, these files are png files. That's the problem.


If you only want to rename photos without changing format or extension, use batch rename without the extension "jpg" option ...
I just want to change the original image file name in batches, why does it change to a format change?
ren1.jpg
.
.
But now the wrong names ,( because jpg extension was used) are : hh0001.jpg and hh0002.jpg
You must do the reverse renaming : rename with "png" extension to repair ...
hh0001.jpg will become hh0001.png

---

To convert png files into jpg, use "batch convert", they will get yellow color corresponding to jpg format.

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). 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?
Post Reply