Page 2 of 3
Re: [request] batch-convert options
Posted: Sun Oct 01, 2023 1:31 pm
by xnview
gendalf wrote: Fri Feb 24, 2023 11:44 am
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:
So when you use same format for input/output file, right?
Re: [request] batch-convert options
Posted: Sun Oct 01, 2023 2:22 pm
by cday
xnview wrote: Sun Oct 01, 2023 1:31 pm
So when you use same format for input/output file, right?
Coding to simply compare the size of each output file with the size of the processed input file, without checking the output format, would meet the requirement, and also allow file size comparison when the output format is different if that is useful, wouldn't it?
As all output files always have the same extension, that should meet the requirement and give an additional option at no cost?
Re: [request] batch-convert options
Posted: Fri Oct 06, 2023 10:11 am
by gendalf
@xnview, should work regardless of input/output format (like when converting a folder with a bunch of random .png, .jpeg, .webp to 95% .webp) or conditional filters (like resize to 4000 width, if width>4000 ).
Re: [request] batch-convert options
Posted: Mon Oct 09, 2023 8:06 am
by xnview
See
issue for current status and some details.
Re: [request] batch-convert options
Posted: Tue Oct 10, 2023 7:41 am
by masterjp
+1 Good idea!
Re: [request] batch-convert options
Posted: Thu Oct 12, 2023 1:15 pm
by xnview
This problem is supposed to be fixed in
XnView MP 1.6.0. Please check and confirm the bug fix here.
Re: [request] batch-convert options
Posted: Sun Oct 15, 2023 12:13 am
by gendalf
@xnview,
1. Conflicts with the "delete original" option, as I don't need it to delete the original - if it's smaller than converted, and I don't need it to keep 2 of each images of a downsized image (should work with delete original on, therefore keeping the original number of unique files).
2. Doesn't work at all with filters on (conditional action, like resize).
Re: [request] batch-convert options
Posted: Sun Oct 15, 2023 8:08 am
by xnview
gendalf wrote: Sun Oct 15, 2023 12:13 am
@
xnview,
1. Conflicts with the "delete original" option, as I don't need it to delete the original - if it's smaller than converted, and I don't need it to keep 2 of each images of a downsized image (should work with delete original on, therefore keeping the original number of unique files).
As it's an experimental feature, currently 'delete original' doesn't work with it...
2. Doesn't work at all with filters on (conditional action, like resize).
Yes, i don't know what to make. If you want to resize or adjust, do i need to keep original one??
Re: [request] batch-convert options
Posted: Sun Oct 15, 2023 4:27 pm
by gendalf
@xnview, 2. Compare end-result (after application of conditional filters and after conversion) to original, then it's the same logic:
- keep original if it is still smaller (without saving the converted&resized).
- otherwise keep converted&resized, while deleting original.
Re: [request] batch-convert options
Posted: Mon Oct 16, 2023 9:13 am
by xnview
gendalf wrote: Sun Oct 15, 2023 4:27 pm
@
xnview, 2. Compare end-result (after application of conditional filters and after conversion) to original, then it's the same logic:
- keep original if it is still smaller (without saving the converted&resized).
- otherwise keep converted&resized, while deleting original.
Yes, but

even if user add multiple actions?
Re: [request] batch-convert options
Posted: Tue Oct 17, 2023 5:45 am
by gendalf
@xnview, the goal is size reduction, so the comparison should be the last automated decision making check for which file to keep - converted&resized&whatever or old. Otherwise you'd just not have the option ticked (default) in the first place.
Re: [request] batch-convert options
Posted: Tue Oct 17, 2023 5:20 pm
by user0
I think you are trying to fit your VERY specific workflow into single setting.
core functionality of this feature should only affect result file (depends on comparison):
- keep encoded version OR
- replace it with a copy of the original
then there will be no any conflicts with
- delete original setting
- overwrite original if you choose same folder/filename
gendalf wrote: Sun Oct 15, 2023 12:13 am
@
xnview,
2. Doesn't work at all with filters on (conditional action, like resize).
Technically it's possible, but logically it doesn't make sense to me yet.
If I add a filter, I want it to be applied regardless of the result file size.
At this point, I can only identify 2 reasonable uses:
- convert multiformat input into single format
- resaving same format with differect settings
Re: [request] batch-convert options
Posted: Wed Oct 18, 2023 8:30 am
by gendalf
user0 wrote: If I add a filter, I want it to be applied regardless of the result file size.
This option compares: ?end result < original? and keeps original or the end result. Filters 'might' assist in reducing the filesize, but not always (for example original might be low quality already or the conditional resize for current file isn't significant enough), but ultimately, this option should be the decision-maker for the end result, after both filters and conversion applied.
If you just want the conditional filters applied to everything (or no filters, simple conversion), then don't tick the "only keep smallest size file" option, as I've mentioned above, and use the program as if this option doesn't exist, or run it twice

Re: [request] batch-convert options
Posted: Wed Oct 18, 2023 10:29 am
by user0
It seems like "file size" is the only success criteria and you don't really care about "image quality/size", it's strange tbh.
But so far, the only part I disagree with is that new setting shall REPLACE original file (as far as I understand you).
It shall only work with target folder and COPY original there (depends on size comparison). Of cause, if source and target folder/filenames are the same - originals will be replaced.
Then you go and manually delete original folder if you do not need originals anymore.
However, to fully understand your needs, can you provide:
- few example pairs, eg 1_source, 1_result, etc (result with filter applied as well)
- filter(s) settings
- target format(s) encoder settings (if differs from default)
Re: [request] batch-convert options
Posted: Tue Nov 21, 2023 8:39 am
by xnview
Should be ignored or copied?
From another user
rather than "keep", it will actually "copy" the original file