[request] batch-convert options

Bugs which have been reproduced by a second user or the developer, or features to do

Moderator: Dreamer

Post Reply
gendalf
Posts: 49
Joined: Thu Aug 04, 2011 1:26 pm

[request] batch-convert options

Post by gendalf »

I need an option in batch-convert, to convert current image only if new file size is less than old file size

and option to save options of batchconvert to use later multiple times same options
Last edited by gendalf on Wed Nov 02, 2011 9:35 pm, edited 2 times in total.
User avatar
xnview
Author of XnView
Posts: 34643
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: [request] batch-convert options

Post by xnview »

gendalf wrote:I need an option in batch-convert, to convert current image only if new file size is less than old file size
Ok
and option to save options of batchconvert to use later multiple times same options
you have script
Pierre.
gendalf
Posts: 49
Joined: Thu Aug 04, 2011 1:26 pm

Re: [request] batch-convert options

Post by gendalf »

you have script
i save options (only .bat available), but the next time: i try to open saved .bat but it shows only .xbs files
???
User avatar
xnview
Author of XnView
Posts: 34643
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: [request] batch-convert options

Post by xnview »

gendalf wrote:
you have script
i save options (only .bat available), but the next time: i try to open saved .bat but it shows only .xbs files
???
Sorry but i don't understand, if you save script as xbs, you are able to load it later...
Pierre.
gendalf
Posts: 49
Joined: Thu Aug 04, 2011 1:26 pm

Re: [request] batch-convert options

Post by gendalf »

I haven't noticed that the save button is only active when entering characters into the field. -_- therefore i saved it using the export button
gendalf
Posts: 49
Joined: Thu Aug 04, 2011 1:26 pm

Re: [request] batch-convert options

Post by gendalf »

will you implement this 'condition on convert' stuff? :(
like when i use batch convert - check each file - if new file size smaller than previous file size then convert this file and check next, else check next file
jupi
Posts: 4
Joined: Thu Jul 30, 2009 9:25 pm

Re: [request] batch-convert options

Post by jupi »

Hi, i would appreciate this function too
...some checkbox for "do it only if result image is smaller than original"

(I didn't find option for that even in when i use scripts)
gendalf
Posts: 49
Joined: Thu Aug 04, 2011 1:26 pm

Re: [request] batch-convert options

Post by gendalf »

on top of that idea would be nice to have an option to chose the lowest size from the selected preset formats & their settings, so for example:
batch convert images inside selected folders into one of webp, jpg, gif using set settings, chosing whichever is the smallest per file, delete originals to bin
User avatar
xnview
Author of XnView
Posts: 34643
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: [request] batch-convert options

Post by xnview »

gendalf wrote: Mon Aug 20, 2012 1:13 pm will you implement this 'condition on convert' stuff? :(
like when i use batch convert - check each file - if new file size smaller than previous file size then convert this file and check next, else check next file
so like this topic
Pierre.
gendalf
Posts: 49
Joined: Thu Aug 04, 2011 1:26 pm

Re: [request] batch-convert options

Post by gendalf »

xnview, I haven't found anything described in this thread in NConvert either
cday
XnThusiast
Posts: 2706
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: [request] batch-convert options

Post by cday »

gendalf wrote: Mon Mar 16, 2020 7:59 pm xnview, I haven't found anything described in this thread in NConvert either
The conversion option recently added to NConvert compares the file size of the input file with a specified numeric value:

Code: Select all

-greater_than type value  : Process only if arg is less than value: Overwrite existing file
-less_than type value     : Process only if arg is less than value
 type : height width filesize
Note that the filesize is specified in bytes.

Hopefully Pierre will soon add an option to test against the file size of the input file.
gendalf
Posts: 49
Joined: Thu Aug 04, 2011 1:26 pm

Re: [request] batch-convert options

Post by gendalf »

cday, the whole request is about new file size vs old file size, not a specified value, also ideally not command line/script :?
(skip converting any images where the encoded version would be larger than the original)

the only application I've found so far that is able to do this (almost) exactly as I want is Android Studio, but it has a few issues:
it only does this for webp ( https://developer.android.com/studio/write/convert-webp );
you have to select folders with an image at the same level, otherwise the context option doesn't appear for just folders selected;
it takes a lot of extra space to run the option as it is not doing it image by image but rather the entire batch at once; (and the program itself is 2.2gb)
still room for improvement like for example options to ignore extensions.
Also it doesn't seem to work with larger folder structures/numbers of files, idk if it just doesn't like a variety of symbols/languages or what..
it removes exif/data.

here is its log:
366 files were converted
66.1 MB saved
1090 files were skipped because there was no net space savings
Post Reply