Page 1 of 1

-rflag orient

Posted: Sun Aug 15, 2010 11:39 am
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.

Re: -rflag orient

Posted: Sun Aug 15, 2010 4:45 pm
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

Re: -rflag orient

Posted: Sun Aug 15, 2010 5:52 pm
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...

Re: -rflag orient

Posted: Sun Aug 15, 2010 9:41 pm
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.

Re: -rflag orient

Posted: Sun Aug 15, 2010 10:49 pm
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...

Re: -rflag orient

Posted: Tue Aug 17, 2010 1:59 am
by xnview
If you have 3648x2736 or 2736x3648 picture files, which result do you have?