Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
yogiyang
Posts: 5 Joined: 2013-08-13T05:21:01-07:00
Authentication code: 6789
Contact:
Post
by yogiyang » 2013-10-31T00:42:46-07:00
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
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Contact:
Post
by snibgo » 2013-10-31T01:20:08-07:00
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"
yogiyang
Posts: 5 Joined: 2013-08-13T05:21:01-07:00
Authentication code: 6789
Contact:
Post
by yogiyang » 2013-10-31T03:32:26-07:00
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
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Contact:
Post
by snibgo » 2013-10-31T04:10:09-07:00
How about:
Code: Select all
copy "12 x 36\010 copy.jpg" c:\up_temp\001.jpg
Users browsing this forum: Ahrefs [Bot] , Bing [Bot] , Google [Bot] , Semrush [Bot] and 34 guests