-rflag orient

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: helmut, XnTriq, xnview

Post Reply
Someguy
Posts: 3
Joined: Sun Aug 15, 2010 11:18 am

-rflag orient

Post by Someguy »

Hi,
I would like to rezize (to 800*600 or 600*800) an image while keeping aspect ratio and rotate based on orientation.
The problem is that the pictures are never rotated, but resize works...

This is the batch script I am using:

Code: Select all

nconvert.exe -out jpeg -o D:\Temp\1\%%_800.jpg -ratio -rtype linear -rflag orient -resize 800 800 -sharpen 15 %1
For testing, I am using pictures that have the EXIF orientation flag set to 6 or 8. They are shown correctly (rotated) in XnView browser.

I found similar older topics, but none helped.

I tried versions 5.62 and 5.70.

Thanks all.
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: -rflag orient

Post by marsh »

It resizes according to whether or not image is a landscape or portrait. Rotate being different.
Ex.
-o out.png -rotate 90 in.png
Someguy
Posts: 3
Joined: Sun Aug 15, 2010 11:18 am

Re: -rflag orient

Post by Someguy »

When "Batch processing" in XnView GUI and the "resize" transformation with option "follow orientation" checked it does rotate the picture though.
Else, what sense would that option make?

The original picture is 3648x2736. After "resize" a portrait should be 600x800, landscape should be 800x600 (it works in batch processing). How would you do that without a rotation and while keeping aspect ratio, you would lose alot of information?

Also and older topic:
http://newsgroup.xnview.com/viewtopic.php?f=57&t=17563

But it does not seems to work...
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: -rflag orient

Post by marsh »

Someguy wrote: The original picture is 3648x2736. After "resize" a portrait should be 600x800, landscape should be 800x600 (it works in batch processing). How would you do that without a rotation and while keeping aspect ratio, you would lose alot of information?
It switches w/h values entered. Ex. 800x600 to 600x800. Else, a portrait result could be ???x600 rather than ???x800.

If a result appears to rotate in GUI version, that could be a matter of Exif data not being preserved (according to write settings) in combination with view according to Exif tag.
Someguy
Posts: 3
Joined: Sun Aug 15, 2010 11:18 am

Re: -rflag orient

Post by Someguy »

Ok sorry, I am conpletely confused now. What about the link further up to an older thread from 2009, that describes *exactly* the same problem?
No one mentions that any rotation command is necessary and even Piere did reply...
User avatar
xnview
Author of XnView
Posts: 46252
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: -rflag orient

Post by xnview »

If you have 3648x2736 or 2736x3648 picture files, which result do you have?
Pierre.
Post Reply