[request] batch-convert options
Moderators: XnTriq, helmut, xnview, Dreamer
-
- Posts: 71
- Joined: Thu Aug 04, 2011 1:26 pm
[request] batch-convert options
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
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.
-
- Author of XnView
- Posts: 45062
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: [request] batch-convert options
Okgendalf wrote:I need an option in batch-convert, to convert current image only if new file size is less than old file size
you have scriptand option to save options of batchconvert to use later multiple times same options
Pierre.
-
- Posts: 71
- Joined: Thu Aug 04, 2011 1:26 pm
Re: [request] batch-convert options
i save options (only .bat available), but the next time: i try to open saved .bat but it shows only .xbs filesyou have script
???
-
- Author of XnView
- Posts: 45062
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: [request] batch-convert options
Sorry but i don't understand, if you save script as xbs, you are able to load it later...gendalf wrote:i save options (only .bat available), but the next time: i try to open saved .bat but it shows only .xbs filesyou have script
???
Pierre.
-
- Posts: 71
- Joined: Thu Aug 04, 2011 1:26 pm
Re: [request] batch-convert options
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
-
- Posts: 71
- Joined: Thu Aug 04, 2011 1:26 pm
Re: [request] batch-convert options
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
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
-
- Posts: 4
- Joined: Thu Jul 30, 2009 9:25 pm
Re: [request] batch-convert options
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)
...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)
-
- Posts: 71
- Joined: Thu Aug 04, 2011 1:26 pm
Re: [request] batch-convert options
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
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
-
- Author of XnView
- Posts: 45062
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 71
- Joined: Thu Aug 04, 2011 1:26 pm
Re: [request] batch-convert options
xnview, I haven't found anything described in this thread in NConvert either
-
- XnThusiast
- Posts: 4215
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: [request] batch-convert options
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
Hopefully Pierre will soon add an option to test against the file size of the input file.
-
- Posts: 71
- Joined: Thu Aug 04, 2011 1:26 pm
Re: [request] batch-convert options
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
(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
-
- Author of XnView
- Posts: 45062
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: [request] batch-convert options
So a 'skip files where the encoded result is larger than original' only when you the output folder is 'source', right?
Pierre.
-
- Posts: 71
- Joined: Thu Aug 04, 2011 1:26 pm
Re: [request] batch-convert options
@xnview,
0: add folder (with subfolders) to batch convert. (ideally with a filter list to only select certain filetypes within)
1: encode source file with desired settings
2: compare file sizes of encoded and source
3.1: encoded filesize < source filesize:
place source to bin if it's larger and place encoded file in source folder
3.2: encoded filesize >= source filesize:
do nothing or increase counter (e.g. to display how many files weren't converted due to this condition in results log and list them, maybe)
0: add folder (with subfolders) to batch convert. (ideally with a filter list to only select certain filetypes within)
1: encode source file with desired settings
2: compare file sizes of encoded and source
3.1: encoded filesize < source filesize:
place source to bin if it's larger and place encoded file in source folder
3.2: encoded filesize >= source filesize:
do nothing or increase counter (e.g. to display how many files weren't converted due to this condition in results log and list them, maybe)
-
- Author of XnView
- Posts: 45062
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France