Page 1 of 1

How to convert an image and also generate thumbnail from it

Posted: 2013-10-31T00:42:46-07:00
by yogiyang
I want to convert any supported format image to JPG and also generate a thumbnail of max size 200x200 pixels.

Currently I am giving two commands for this:

Code: Select all

convert "12 x 36\010 copy.jpg" c:\up_temp\001.jpg
and

Code: Select all

"convert.exe" -define jpeg:size=500x180 "C:\up_temp\001.jpg"  -auto-orient -thumbnail 200x200   -unsharp 0x.5  "c:\up_temp\tn\00001.jpg"
The first command is generating JPG which are bigger than the original file so what can I do to compress the generated file without any quality loss?

How can I convert above two commands to one single command so that both things are completed in one single command?

TIA

Yogi Yang

Re: How to convert an image and also generate thumbnail from

Posted: 2013-10-31T01:20:08-07:00
by snibgo
You don't need the first command. Just put the original file name in the second command.

Code: Select all

"convert.exe" -define jpeg:size=500x180 "12 x 36\010 copy.jpg"  -auto-orient -thumbnail 200x200   -unsharp 0x.5  "c:\up_temp\tn\00001.jpg"

Re: How to convert an image and also generate thumbnail from

Posted: 2013-10-31T03:32:26-07:00
by yogiyang
snibgo wrote:You don't need the first command. Just put the original file name in the second command.

Code: Select all

"convert.exe" -define jpeg:size=500x180 "12 x 36\010 copy.jpg"  -auto-orient -thumbnail 200x200   -unsharp 0x.5  "c:\up_temp\tn\00001.jpg"
Thanks for your assistant.

This only creates the thumbnail. The the file created when using my first command is not getting generated here.

TIA

Yogi Yang

Re: How to convert an image and also generate thumbnail from

Posted: 2013-10-31T04:10:09-07:00
by snibgo
How about:

Code: Select all

copy "12 x 36\010 copy.jpg" c:\up_temp\001.jpg