Batch convert seems to alter the quality even when no action is performed

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

Moderators: XnTriq, helmut, xnview, Dreamer

Post Reply
NicoPL
Posts: 9
Joined: Sun Jun 25, 2017 10:24 am

Batch convert seems to alter the quality even when no action is performed

Post by NicoPL »

Hi,

The topic at this link is similar but slightly different : http://newsgroup.xnview.com/viewtopic.p ... t+filesize

When using Batch Convert to batch edit the IPTC tags, and keeping the format "as original" (therefore "settings cannot be changed"), I noticed a change on the filesize of all my pictures.
It seems strange as the picture is not modified in anyway, only the metadata should be.
I tested a Batch Conversion with NO action at all. And still keeping the format "as original".
That way, the expected result should have been a simple copy of the files. But no, I get the new files with half the size of the original ones.

I understand the arguments in the answers on the above linked topic. However, when you have a lot of pictures and want to perform: Exif rotate, change timestamp, renaming according the timestamp, and then writing the Author, Copyright, etc. in the IPTC tags, it is very very useful to script it! and it should not be altering the quality of the picture.

Questions:
- Why does the Batch Conversion still compute a new compression on the original file when keeping the format "As Original"?
- Why does the Batch Conversion still compute a new compression on the original file when doing actions like renaming, editing tags, lossless Exif rotation, etc.?
- Could we still use Batch scripts performing actions without altering the picture itself?

Thanks!

NicoPL
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch convert seems to alter the quality even when no action is performed

Post by cday »

You don't mention the format of your source files, but I wonder if the Settings tab setting Load format settings... might be relevant: possibly the change you are seeing arise from the way in which the source files are being read... :?:
NicoPL
Posts: 9
Joined: Sun Jun 25, 2017 10:24 am

Re: Batch convert seems to alter the quality even when no action is performed

Post by NicoPL »

Sorry for that, I forgot to tell that the files are all .jpg .
Thank you for the notice of 'Load Format Settings". Unfortunately it doesn't seem to change anything to the issues I encountered.
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch convert seems to alter the quality even when no action is performed

Post by cday »

Perhaps you upload example JPEGs to illustrate the problem, it would be best to place the before and after files in ZIP or similar archive to ensure that they are not modified in anyway when uploaded...
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Batch convert seems to alter the quality even when no action is performed

Post by xnview »

Batch convert load and re-write (recompress) the picture, why you don't use IPTC dialog?
Pierre.
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch convert seems to alter the quality even when no action is performed

Post by cday »

xnview wrote:Batch convert load and re-write (recompress) the picture, why you don't use IPTC dialog?
It seems slightly strange that when the output file type is set to As original files can only be saved with the [unspecified] default settings, which may not be settings the user would choose, but I suppose there could be a practical reason for that considering the interface design?

Edit: In the case of JPEG wouldn't it be natural to save using the 'estimated original quality' ?

In practice a user might, as NicoPL does, wish to save the output files with the same settings as the input files, or in another situation wish to save the output files with diferent settings such as higher compression.
NicoPL wrote:When using Batch Convert to batch edit the IPTC tags, and keeping the format "as original" (therefore "settings cannot be changed"), I noticed a change on the filesize of all my pictures.
It seems strange as the picture is not modified in anyway, only the metadata should be.
I tested a Batch Conversion with NO action at all. And still keeping the format "as original".
That way, the expected result should have been a simple copy of the files. But no, I get the new files with half the size of the original ones.
I think a simple solution to your issue would be to set the output file type to JPEG rather than to As original which would make all the JPEG Settings... options available:

Clipboard01.png
Clipboard01.png (18.12 KiB) Viewed 1741 times
You have the option there (among other options) to set Use estimated quality to maintain similar compression to the input files.
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Batch convert seems to alter the quality even when no action is performed

Post by xnview »

'As original' is for 'Format as original'
Pierre.
NicoPL
Posts: 9
Joined: Sun Jun 25, 2017 10:24 am

Re: Batch convert seems to alter the quality even when no action is performed

Post by NicoPL »

Hi,

Thank you for your answers and workarounds.

I tried your idea cday, putting "jpg" as the output format, with "use estimated quality (when possible)" ticked.
Unfortunately it doesn't do anything. I still get an output file of 1Mo instead of 3Mo (the size of the original one).

I reckon that this is very confusing. I almost performed a Batch Convert with "Exif Rotate" followed by "IPTC tagging" on all my pictures, replacing the original ones! and the almost lost the original quality of all my pictures... Hopefully I noticed the filesize change before deleting all my original pictures.

I still don't understand why when NO action is performed (the list of actions in "Action" tab is [0/0]) and output file is specified "As Original" we don't get a simple copy.

To xnview:
xnview wrote:Batch convert load and re-write (recompress) the picture, why you don't use IPTC dialog?
When you have to perform always the same actions when uploading new pictures: Exif rotate, change timestamp, renaming according the timestamp, and then writing the Author, Copyright, etc. in the IPTC tags, it is very very useful to script it! and it should not be altering the quality of the picture.
I'm therefore looking for a piece of software that wan perform these actions, preloaded in a setting file.
XnView seems the best to do it, but I still don't understand why Batch Convert computes operations that are not listed. Actually, I think that depending on the actions required, Batch Convert should decide whether to open the picture and compute another compression, or perform lossless actions and metadata actions without altering the picture itself.

Anyway, I thank you again for your amazing work. XnViewMp is by far the best piece of software I found to deal with my pictures!
PP0815
Posts: 32
Joined: Wed Mar 26, 2014 10:47 am

Re: Batch convert seems to alter the quality even when no action is performed

Post by PP0815 »

Batch Convert ALWAYS have influence on the quality of the picture (JPG) cause the file will be loaded and saved again and that alone causes a recompression (loss in quality). There are only a few things that don't touch the picture (no recompress or in other words lossless):
1. Rotate in 90 degree steps
2. Flip vertical or horizontal
3. Lossless crop (the crop selection has to be a multiple of 8
4. recreate the Exif embedded thumbnail of the picture
5. change metadata (EXIF, IPTC and XMP)

If you just want to change the IPTC Metadata you should :
1. Select the pictures you want to edit
2. Press CTRL and i (or go to TOOLS -> METADATA -> EDIT IPTC/XMP
3. Edit whatever you like (Copyright, Author, Categories, Keywords etc)
4. Hit SAVE ALL
NicoPL
Posts: 9
Joined: Sun Jun 25, 2017 10:24 am

Re: Batch convert seems to alter the quality even when no action is performed

Post by NicoPL »

Ok then I understand that Batch Convert is not able to perform lossless actions and save them on unaltered pictures.
The only way to perform Batch Lossless Actions is to to it manually, and I can't script it.

This is what I was asking in my first message.
NicoPL wrote: Questions:
- Why does the Batch Conversion still compute a new compression on the original file when keeping the format "As Original"?
- Why does the Batch Conversion still compute a new compression on the original file when doing actions like renaming, editing tags, lossless Exif rotation, etc.?
- Could we still use Batch scripts performing lossless actions without altering the pictures themselves?
Actually, improvements could be:
  • Make sure that people understand that everytime somebody uses Batch Convert, it will alter the quality of the picture, even if only lossless actions are performed
  • Propose a new tool to perform a script of lossless actions, as the ones PP0815 listed.
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Batch convert seems to alter the quality even when no action is performed

Post by xnview »

NicoPL wrote: Sun Jul 02, 2017 4:06 am [*] Propose a new tool to perform a script of lossless actions, as the ones PP0815 listed.[/list]
do you use more than one lossless action?
Pierre.
NicoPL
Posts: 9
Joined: Sun Jun 25, 2017 10:24 am

Re: Batch convert seems to alter the quality even when no action is performed

Post by NicoPL »

Hi Pierre,

Yes, I perform :

0- rename according to the exif date (can't be scripted right now)

1- rotate according to the exif field
2- recreate the thumbmail
3- edit xmp/iptc/exif tags

Today I have to perform manually 0,1 and 2, then use a custom script run with exiftool to do the 3rd (because xnview has some issues dealing with the tags)
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Batch convert seems to alter the quality even when no action is performed

Post by xnview »

i think that XnConvert is not good for such process, NConvert can perhaps help you
Pierre.
Post Reply