convert 600 800 or 800 600

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

Moderators: XnTriq, xnview

Post Reply
maxteo

convert 600 800 or 800 600

Post by maxteo » Sat Mar 11, 2006 6:32 pm

using nconvert with -resize 800 0 1 on *.jpg I get somme files 800 600 but some with 800 1066 because the original picture is vertical.
Normal with thoses options, but I can't find anything to get automaticaly 800 600 or 600 800 depending on the original picture.

Thanks in advance.

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

Re: convert 600 800 or 800 600

Post by xnview » Mon Mar 13, 2006 9:34 am

maxteo wrote:using nconvert with -resize 800 0 1 on *.jpg I get somme files 800 600 but some with 800 1066 because the original picture is vertical.
Normal with thoses options, but I can't find anything to get automaticaly 800 600 or 600 800 depending on the original picture.

Thanks in advance.
You must use -rflag orient
Pierre.

Guest

Post by Guest » Mon Mar 13, 2006 2:52 pm

And that is fine if you actually want the image to be either 800x600 or 600x800, but what do you do when you want the image to have a max height of 600, and max width of 800?

In other words a portrait could very well end up being something like 450x600 (still preserving a 4:3 ratio).

Is this possible in either nconvert or the GUI?

Regards,
Holroy

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

Post by xnview » Mon Mar 13, 2006 8:15 pm

Anonymous wrote:And that is fine if you actually want the image to be either 800x600 or 600x800, but what do you do when you want the image to have a max height of 600, and max width of 800?

In other words a portrait could very well end up being something like 450x600 (still preserving a 4:3 ratio).

Is this possible in either nconvert or the GUI?
Do you have tested with rflag?
Pierre.

maxteo

-rflag orient

Post by maxteo » Mon Mar 13, 2006 8:57 pm

I will try that right now. Thank you for your help and I am

Impréssionné par xnview et nconvert, je ne peux rien dire d'autre que: Félicitation. Je te tire mon chapeau.
Merci à toi.

maxteo

doesnt work

Post by maxteo » Mon Mar 13, 2006 9:14 pm

Here is the option I use:

nconvert -npcd 2 -size 256x256+0 -ctype grey -corder inter -out jpeg -n 15 15 1 -rmeta -q 75 -o temp\*.jpg -ratio -rtype linear -rflag orient -resize 0 600 *.jpg

if my picture is horizontal, I get a 800*600
if my picture is vertical, I get a 450*600. I would like a 600*800

I think it's the -resize I put with is wrong, but can't find anything else.
Thanks again for your help.

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

Re: doesnt work

Post by xnview » Tue Mar 14, 2006 4:29 am

maxteo wrote:Here is the option I use:

nconvert -npcd 2 -size 256x256+0 -ctype grey -corder inter -out jpeg -n 15 15 1 -rmeta -q 75 -o temp\*.jpg -ratio -rtype linear -rflag orient -resize 0 600 *.jpg

if my picture is horizontal, I get a 800*600
if my picture is vertical, I get a 450*600. I would like a 600*800

I think it's the -resize I put with is wrong, but can't find anything else.
Thanks again for your help.
try -resize 800 600
Pierre.

maxteo

HOURRA

Post by maxteo » Tue Mar 14, 2006 9:08 pm

I got it. The solution is in fact

-rflag orient -resize 800 800

Thank you very much for your patience. I am not an expert yet but got with nconvert the tool I was looking for to manage all my pictures and it will save me so much time.

Regards.
MAXTEO-Paris

Buthrakaur

similar problem

Post by Buthrakaur » Wed Jul 12, 2006 2:44 pm

I have similar problem here. I'd like to process a set of images and resize them all to 640x480 at most, retain their aspect ratio and also resize them according to their orientation (that means to 640x480 at most when orientation is landscape and 480x640 at most when orientation is portrait). My aim is to process a directory with images with different aspect ratios (3:2 vs 4:3).

I tried to call nconvert like this:
nconvert -npcd 2 -size 256x256+0 -ctype grey -corder inter -out jpeg -o C:\xx\%.jpg -ratio -rtype linear -rflag orient -resize 640 480

but the -ratio and -rflag orient don't seem to work properly when I use them together. Such setting leads to too small images - the longer side is always 480 (or its ratio equivalent) instead of 640. This applies even if I swap the two arguments (-resize 640 480 -> -resize 480 640).

Is there any solution how to do this?

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

Re: similar problem

Post by xnview » Thu Jul 13, 2006 2:01 am

Buthrakaur wrote:I have similar problem here. I'd like to process a set of images and resize them all to 640x480 at most, retain their aspect ratio and also resize them according to their orientation (that means to 640x480 at most when orientation is landscape and 480x640 at most when orientation is portrait). My aim is to process a directory with images with different aspect ratios (3:2 vs 4:3).

I tried to call nconvert like this:
nconvert -npcd 2 -size 256x256+0 -ctype grey -corder inter -out jpeg -o C:\xx\%.jpg -ratio -rtype linear -rflag orient -resize 640 480

but the -ratio and -rflag orient don't seem to work properly when I use them together. Such setting leads to too small images - the longer side is always 480 (or its ratio equivalent) instead of 640. This applies even if I swap the two arguments (-resize 640 480 -> -resize 480 640).

Is there any solution how to do this?
try -rtype linear -rflag orient -resize 640 640
Pierre.

Buthrakaur

Post by Buthrakaur » Thu Jul 13, 2006 6:24 am

That's it - thanks a lot.

Post Reply