Page 1 of 1
NConvert jpg -> jpg how to reduce size?
Posted: Mon May 30, 2005 11:12 am
by DeepKeeper
The problem is converting jpg image to jpg with fixed resulting max Wildth and max Height saving aspect ratio.
For example picture 250x200 should be converted to 100x80 and 200x250 to 80x100.
Can do it automatically using NConvert?
Re: NConvert jpg -> jpg how to reduce size?
Posted: Tue May 31, 2005 1:19 pm
by xnview
DeepKeeper wrote:The problem is converting jpg image to jpg with fixed resulting max Wildth and max Height saving aspect ratio.
For example picture 250x200 should be converted to 100x80 and 200x250 to 80x100.
Can do it automatically using NConvert?
You can use :
Posted: Sun Jul 17, 2005 12:29 pm
by bishopdonmiguel
You can use :
Code:
-rflag orient
I want to do exactly as DeepKeeper describes. I have source jpg's at 2272x1704 and 1704x2272. I'd like nconvert to intelligently resize to 640x480 or 480x640 based on the source orientation. Unfortunately, I haven't found a syntax that will do this.
I have tried...
nconvert. exe -out jpeg -ratio -rflag orient -resize 640 0 -o %.jpg *.jpg
...but all the output files are 640 wide with varying height (480 for the 2272x1704 files and 853 for the 1704x2272 files). It is possible for nconvert to correctly resize the various files a single command? Would you provide an example please?
Thank you.
p.s. great program

Posted: Sun Jul 17, 2005 2:06 pm
by xnview
bishopdonmiguel wrote:I have tried...
nconvert. exe -out jpeg -ratio -rflag orient -resize 640 0 -o %.jpg *.jpg
...but all the output files are 640 wide with varying height (480 for the 2272x1704 files and 853 for the 1704x2272 files). It is possible for nconvert to correctly resize the various files a single command? Would you provide an example please?
Please try:
nconvert. exe -out jpeg -ratio -rflag orient -resize 640 480 -o %.jpg *.jpg
Posted: Mon Jul 18, 2005 2:00 am
by bishopdonmiguel
Please try:
nconvert. exe -out jpeg -ratio -rflag orient -resize 640 480 -o %.jpg *.jpg
Interesting. I will try that. I left the 480 param as 0 because I may have different size source images in the future and I want the image to be 640 by "X" resolution while keeping the original ratio. What will happen if the source has width/height ratio not equal to 640x480? Will the 640 or 480 prevail? Or neither? Will the same value prevail for portrait and landscape orientations?
Thanks.
Posted: Mon Jul 18, 2005 5:57 am
by helmut
bishopdonmiguel wrote:Please try:
nconvert. exe -out jpeg -ratio -rflag orient -resize 640 480 -o %.jpg *.jpg
Interesting. I will try that. I left the 480 param as 0 because I may have different size source images in the future and I want the image to be 640 by "X" resolution while keeping the original ratio. What will happen if the source has width/height ratio not equal to 640x480? Will the 640 or 480 prevail? Or neither? Will the same value prevail for portrait and landscape orientations?
The resizing will make sure that the specified limits are not exceeded but ratio will be kept.
You can try this out with sample pictures and XnView using Batch conversion of XnView: In the dialog "Batch convert" you use the button "Advanced operations" and specify the operations (resize, rotate, ...) you want. Then you perform the conversion. Please note that the convert dialog will not close. If you are happy with the result, you can use the "Export to nconvert script" and have a look at the script and use the interesting lines. Sure enough you should actually also try out your script using nconvert and some test images. nconvert may behave a bit differently or your script may have a bug, so you better use test images at first.
Posted: Mon Jul 18, 2005 8:16 am
by xnview
bishopdonmiguel wrote:Please try:
nconvert. exe -out jpeg -ratio -rflag orient -resize 640 480 -o %.jpg *.jpg
Interesting. I will try that. I left the 480 param as 0 because I may have different size source images in the future and I want the image to be 640 by "X" resolution while keeping the original ratio. What will happen if the source has width/height ratio not equal to 640x480? Will the 640 or 480 prevail? Or neither? Will the same value prevail for portrait and landscape orientations?
You have -ratio so ratio will be kept