Resize (Batch) Inconsistent in Results

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, xnview

Post Reply
Phred
Posts: 21
Joined: Fri Nov 06, 2009 3:48 pm

Resize (Batch) Inconsistent in Results

Post by Phred » Wed Oct 07, 2015 5:47 pm

For quite a while now, XnView has failed to properly resize all selected photos in batch operations. It's now worth documenting, I believe.
Upon selecting a set of random photos, images of all shapes and sizes, I have, today, set a batch process running that I hoped would output resized images with at least one side 800 pixels long.
The output set appears here: https://goo.gl/photos/JrTB2eeFiUjkFnnQ9
or here:
XnView_Convert_Resize_Misfits.PNG
Resized Set
You can see, at about the centre, two images are too small (600x600), and the one at the bottom also loses a dimension a little.
Those first two originated as square.
What do you think is happening?
Thx.

(XnV currently 2.33)
(FWIW, I just cannot bring myself to change over to XnViewMP because it has lost the single greatest feature of XnView Classic: the Ctrl-C ability to copy an image; not a reference to an image, not a shortcut, an IMAGE. :shock: )
(FWIW2, the photos are about CitiGroup's NYC skyscraper that almost fell over. IKYN.)


THE contents of the .xps batch process file are:
resize( 1 lanczos 800 600 0 1 0 )
settings( 0 0 1 1 1 0 0 )
output_path( C:\Users\Public\Downloads\CitiGroup\Normllzd3 )
output( jpeg 80 0 1 2 2 0 1 1 1 0 1 )

User avatar
XnTriq
Moderator & Librarian
Posts: 5265
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Resize (Batch) Inconsistent in Results

Post by XnTriq » Thu Oct 08, 2015 12:00 am

Hi Phred (-:

Could you please give the following script a try?

Code: Select all

resize( 1 lanczos 800 800 0 1 0 )
settings( 0 0 1 1 1 0 0 )
output_path( C:\Users\Public\Downloads\CitiGroup\Normllzd3 )
output( jpeg 80 0 1 2 2 0 1 1 1 0 1 )
I believe you have to change the value for Height to 800 to achieve the desired results.
Attachments
p128099.png

Phred
Posts: 21
Joined: Fri Nov 06, 2009 3:48 pm

Re: Resize (Batch) Inconsistent in Results

Post by Phred » Thu Oct 08, 2015 4:55 pm

Yes, XnTriq, that seems to have solved the matter - oddly enough.
I stayed away from that technique because it implied that the output would be square. 800x800 but with 'Keep ratio'. Which would be subordinate?
I suspect I'll just have to put it down to the dialect of English called 'French'. :?
Quite what 'Fit over (W or H)' and 'Follow orientation (switch W/H)' really mean, I don't know. The Help is silent (on this and many other aspects).

'Follow orientation'? If something's in portrait mode but the parameters are saying change to 1000W & 500H, maintain orientation/ratio, and resize, notwithstanding, to 500W x 1000H? Sort-of makes sense.
800 x 800? Maintain orientation/ratio, and resize at least one side(?) to 800? :|

But 'Fit over'?? I'm thinking of a fitted bed-sheet going on a mattress the wrong way, but then....?

Thanks, Immediate problem solved, more or less.

(As far as XnViewMP losing Ctrl+C, image copy, goes, I find I can't search for Ctrl+C, Ctrl-C, Control+C etc in this forum..)
(XnView crashes when handling very large numbers of files, for more than one type of operation; another topic.)

User avatar
XnTriq
Moderator & Librarian
Posts: 5265
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Resize (Batch) Inconsistent in Results

Post by XnTriq » Thu Oct 08, 2015 6:45 pm

Phred wrote:I suspect I'll just have to put it down to the dialect of English called 'French'. :?
:mrgreen:
Phred wrote:But 'Fit over'?? I'm thinking of a fitted bed-sheet going on a mattress the wrong way, but then....?
This is what I came up with in my :cough: younger days:
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?p=48605#p48605]1.91 English Translation / List of new strings[/url]) wrote:
marsh wrote:
helmut wrote: - What does "Fit over (W or H)" do? Where is it shown?
That label should be changed to something more descriptive (it is new batch convert option). I think it works like this:
[x]Fit to greater of width or height ??
Pierre mentions possibly changing the label in another topic.:)
An illustration from this article on Photoweb (fr»en) helped me understand what it means:

[quote="Olivier_G (What is "Fit over (W or H)")"]Here is an illustration (taken from 'Photoweb'):
__________Fit in_____________________Fit over________
Image
[/quote]
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?p=48615#p48615]1.91 English Translation / List of new strings[/url]) wrote:
helmut wrote:Before finding a good German wording I wonder whether the English is correct: "Fit over (W or H)" is rather somthing like "Fit by cropping (W or H)", isn't it?
Kodak calls it “Zoom & Trim”, “Zoom et recadrage” and “Zoomen und Zuschneiden”.
Kodak EasyShare Gallery ([url=http://web.archive.org/web/20090704083635/http://www.kodakgallery.com/HelpAboutPrints.jsp#zoom]Zoom & Trim printing option[/url]) wrote:Zoom & Trim ON

Image Image
Most photographers prefer their photos to be printed out to all four edges of the photo paper, so it is standard practice at our digital lab (and at most photo processors) for Zoom & Trim ON to be the default setting. However, some cropping may occur on objects near the edges of the print, as in this example.

Zoom & Trim OFF

Image Image
Turning Zoom & Trim OFF centers your photo, and usually results in white borders on two sides of the print. We recommend turning Zoom & Trim OFF only if it is essential to show the entire image (for example, if your photo is square or has been manipulated to be very wide or very tall). You cannot turn Zoom & Trim off for Wallet-size prints.
This seems to be the terminology most commonly used by online photo printing services, so many users are probably already familiar with it.
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?p=48661#p48661]1.91 English Translation / List of new strings[/url]) wrote:I see Helmut is done with the 1.91 German Translation, ...
helmut wrote:

Code: Select all

#define TXT_SeqConvert_Fit_Over                 "Einpassen (Breite oder Höhe)"
... and I've got more suggestions for the English version:

Cerious Software chose the term “Aspect Fit”, ...
ThumbsPlus v7 help wrote:
  • Aspect Fit. This selection sets how ThumbsPlus treats an original whose dimensions are of a different ratio than the destination. In other words, it controls the size of the destination file.
    • Both. The final image fits in the specified rectangle as closely as possible.
    • Width. The final image will be the same width as the specified width.
    • Height. The final image must be the same height as the specified height.
    • Ignore. The aspect ratio of the original is ignored.
  • Background color. If Aspect Fit is set to Both, when resizing to a size that does not match the original aspect ratio, a background is added. Here you may select the color of that background.
ThumbsPlus v3 manual ([url=http://www.cerious.com/manual3/viewimag.shtml#Rotate]Rotate & Resize[/url]) wrote:
  • Aspect Fit. This selection sets how ThumbsPlus treats an original whose dimensions are of a different ratio than the destination. In other words, it controls the size of the destination file.
    • Fit Both. The final image fits in the specified rectangle as closely as possible.
    • Fit Height. The final image must be the same height as the specified height.
    • Fit Width. The final image will be the same width as the specified width.
    • Bounding Box. Most useful for rotations: the final image size is calculated as the size necessary to include the entire image after rotation. This avoids cutting of corners or edges.
    • None. The aspect ratio of the original is ignored.
... while PhotoAccess went for “Shrink with Borders”.
PhotoAccess FAQ ([url=http://web.archive.org/web/20060514012807/http://www.photoaccess.com/user/csFaq.jsp#crop]How do I crop my photos?[/url]) wrote:Image Shrink with Borders

This option prints your entire image, and fills out the rest of the photo paper with blank white space. This option guarantees you will see your entire image, no matter the print size.
<!--// To be continued… //-->

User avatar
XnTriq
Moderator & Librarian
Posts: 5265
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Resize (Batch) Inconsistent in Results

Post by XnTriq » Thu Oct 08, 2015 7:30 pm

Phred wrote:FWIW, I just cannot bring myself to change over to XnViewMP because it has lost the single greatest feature of XnView Classic: the Ctrl-C ability to copy an image; not a reference to an image, not a shortcut, an IMAGE.
What does "Image Data" (Ctrl + shift+c) is supposed to do ?
Phred wrote:As far as XnViewMP losing Ctrl+C, image copy, goes, I find I can't search for Ctrl+C, Ctrl-C, Control+C etc in this forum..
It's a limitation of phpBB. You can also use Google to search the forum: site:newsgroup.xnview.com mp ctrl+c

<!--// To be continued… //-->

User avatar
XnTriq
Moderator & Librarian
Posts: 5265
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Resize (Batch) Inconsistent in Results

Post by XnTriq » Thu Oct 08, 2015 11:45 pm

Phred wrote:'Follow orientation'? If something's in portrait mode but the parameters are saying change to 1000W & 500H, maintain orientation/ratio, and resize, notwithstanding, to 500W x 1000H? Sort-of makes sense.
800 x 800? Maintain orientation/ratio, and resize at least one side(?) to 800? :|
At least that's my interpretation of this option.
alexandrei ([url=http://newsgroup.xnview.com/viewtopic.php?t=12403&p=47673#p47673]resize plugin: how to fit largest side?[/url]) wrote:
xnview wrote:So use W:1024/H:1024
JohnFredC wrote:I've been confused about this too... perhaps some modification to the interface would make it clearer. Different wording, or a mouseover with more instructions?
yes, 1024/1024 makes sense, but it's not like it comes into your mind when you want to resize based on just one side :)

This should be documented, or at least mentioned on the "how to" topic on the forum!

User avatar
XnTriq
Moderator & Librarian
Posts: 5265
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Resize (Batch) Inconsistent in Results

Post by XnTriq » Fri Oct 09, 2015 1:30 am

About.com ([url=http://graphicssoft.about.com/od/xnview/qt/batchresize.htm]How to Resize a Batch of Images with XnView[/url]) wrote:
  • Fit Over - Checking the "Fit over" box will cause XnView to change the smallest size to what you have specified, and the other dimension will be whatever it needs to be to maintain the ratio. That means it may be larger than your specified dimensions in one direction. Use this when only the image width OR height matters.
  • Follow orientation - This option is undocumented, and I have not been able to make sense of it. Recommendation is to leave default, unless you get unexpected rotation, and then try reversing the option.
  • Only Decrease/Increase - With decrease checked, images smaller than your specified dimensions will not be made larger. With increase checked, images larger than your specified dimensions will not be made smaller.
  • Resample - Specify the interpolation algorithm used for adding and deleting pixels. Lanczos is the default and gives high quality results. Recommendation is to leave Lanczos unless you have a reason for using another method.
  • Script - This is useful when you often need to use the same settings for a batch operation. Check the box and press "save" to keep your settings in a file that you can re-load later. To re-load a previously saved settings file, choose it from the menu, or press "Load" to open a script file from a folder. The "Export" button allows you to save it as a Windows script (.bat or .cmd file).

Phred
Posts: 21
Joined: Fri Nov 06, 2009 3:48 pm

Re: Resize (Batch) Inconsistent in Results

Post by Phred » Tue Oct 13, 2015 6:46 am

You're a great curator, XnTriq. :) Many thanks.
I'm settling in to the new meme determining my understanding of resizing, Hs and Ws, and fits.

(BTW, the MP Ctrl-C usage still mystifies me. If I go outside to admire my new car, don't don't go out and admire my new car's data..
An image is, to all intents and purposes, a visual thing, not its supporting data. Grr.
Configurable, but, say, when recommending to novices, having to make the proviso that normal usage has to be set with hidden parameters first is a show-stopper; activating a new branch of my neurones to either reconfigure first or adopt new thinking to accommodate a different 'copy' belies madness, imho; very Francish. But it's a story for elsewhere.)


Thx.

User avatar
XnTriq
Moderator & Librarian
Posts: 5265
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Resize (Batch) Inconsistent in Results

Post by XnTriq » Wed Oct 14, 2015 9:45 pm

Phred wrote:You're a great curator, XnTriq.
Thanks for your kind words, Phred! I kinda suck at beta testing, so I had to find another way to contribute. Oddly enough, some people actually find my “binge linking” extravaganzas useful some of the time. :P
Phred wrote:I'm settling in to the new meme determining my understanding of resizing, Hs and Ws, and fits.
You've made an important point, though. XnView's batch resizing is too powerful to have undocumented or misunderstood options. I think we should consider renaming Fit over (W or H). “Aspect Fit” / “Aspect Fill” / “Scale to Fill” seems to be the most commonly used terminology (UIImageView Scaling Explained Visually).

User avatar
XnTriq
Moderator & Librarian
Posts: 5265
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Resize (Batch) Inconsistent in Results

Post by XnTriq » Thu Oct 15, 2015 4:00 am

foxyshadis ([url=http://newsgroup.xnview.com/viewtopic.php?p=53106&hilit=follow+orientation+landscape+portrait#p53106]Resize in Batch conversion[/url]) wrote:Follow orientation is an exif switch that will automatically rotate the image according to exif metadata.
:? Can you confirm this, Pierre? Don't we have Rotate images according to EXIF orientation tag (Tools » Options... » General » Operations) for that?

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

Re: Resize (Batch) Inconsistent in Results

Post by xnview » Fri Oct 16, 2015 8:04 am

XnTriq wrote:
foxyshadis ([url=http://newsgroup.xnview.com/viewtopic.php?p=53106&hilit=follow+orientation+landscape+portrait#p53106]Resize in Batch conversion[/url]) wrote:Follow orientation is an exif switch that will automatically rotate the image according to exif metadata.
:? Can you confirm this, Pierre? Don't we have Rotate images according to EXIF orientation tag (Tools » Options... » General » Operations) for that?
No. The setting is only to inverse width/height for resize to follow picture orientation
Pierre.

User avatar
XnTriq
Moderator & Librarian
Posts: 5265
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Resize (Batch) Inconsistent in Results

Post by XnTriq » Fri Oct 16, 2015 11:00 am

xnview wrote:The setting is only to inverse width/height for resize to follow picture orientation
… which makes it…
PBY ([url=http://newsgroup.xnview.com/viewtopic.php?p=52814#p52814]Resize in Batch conversion[/url]) wrote:[…] possible to resize the LONG SIDE to a specific size. That's great with portrait/landscape photos.
IOW: Follow orientation (switch W/H) is for “orientation-dependent resizing”.

Post Reply