convert 600 800 or 800 600

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

Moderators: XnTriq, helmut, xnview

maxteo

convert 600 800 or 800 600

Post by maxteo »

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: 44926
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: convert 600 800 or 800 600

Post by xnview »

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 »

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: 44926
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

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 »

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 »

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: 44926
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: doesnt work

Post by xnview »

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 »

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 »

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: 44926
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: similar problem

Post by xnview »

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 »

That's it - thanks a lot.