[request] batch-convert options

Older bugs which are supposed to be fixed in 0.84. *** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: XnTriq, helmut, xnview, Dreamer

User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: [request] batch-convert options

Post 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?
Pierre.
cday
XnThusiast
Posts: 4136
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: [request] batch-convert options

Post 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?
gendalf
Posts: 69
Joined: Thu Aug 04, 2011 1:26 pm

Re: [request] batch-convert options

Post 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 ).
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: [request] batch-convert options

Post by xnview »

See issue for current status and some details.
Pierre.
User avatar
masterjp
Posts: 449
Joined: Fri Feb 13, 2009 4:37 pm
Location: Duesseldorf, Germany

Re: [request] batch-convert options

Post by masterjp »

+1 Good idea!
PC: Intel 8700k + Asus Z370-F + 16 GB RAM G.Skill + Asus RTX 3050 OC + Samsung SSD
OS: Windows 10 Pro 64bit 22H2 |
GFX: XN-View 2.51.6 | XnViewMP 1.8.0 | XnConvert 1.100.1 | Adobe Photoshop Elements 2024 | Elements XXL 11 | Paint.Net
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: [request] batch-convert options

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.6.0. Please check and confirm the bug fix here.
Pierre.
gendalf
Posts: 69
Joined: Thu Aug 04, 2011 1:26 pm

Re: [request] batch-convert options

Post 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).
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: [request] batch-convert options

Post 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??
Pierre.
gendalf
Posts: 69
Joined: Thu Aug 04, 2011 1:26 pm

Re: [request] batch-convert options

Post 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.
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: [request] batch-convert options

Post 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?
Pierre.
gendalf
Posts: 69
Joined: Thu Aug 04, 2011 1:26 pm

Re: [request] batch-convert options

Post 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.
User avatar
user0
XnThusiast
Posts: 1886
Joined: Sat May 09, 2015 9:37 am

Re: [request] batch-convert options

Post 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
gendalf
Posts: 69
Joined: Thu Aug 04, 2011 1:26 pm

Re: [request] batch-convert options

Post 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 :|
User avatar
user0
XnThusiast
Posts: 1886
Joined: Sat May 09, 2015 9:37 am

Re: [request] batch-convert options

Post 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)
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: [request] batch-convert options

Post by xnview »

Should be ignored or copied?

From another user
rather than "keep", it will actually "copy" the original file
Pierre.