I prepared some code to execute such command line:
c:\cygwin\bin\convert "c:\root\dropbox\www\tiff\photos\architecture\calendar-bwl-projekt\bwl01.tif" -thumbnail 352x352^ -format jpg -filter Catrom -unsharp 0x1 "c:\root\dropbox\www\tiff\thumbnails\architecture\calendar-bwl-projekt\thumbnail\bwl01.jpg"
This works fine from command line (same command as above) but 352x352^ is 352x352^ not 352x352:
c:\cygwin\bin\convert "c:\root\dropbox\www\tiff\photos\architecture\calendar-bwl-projekt\bwl01.tif" -thumbnail 352x352^ -format jpg -filter Catrom -unsharp 0x1 "c:\root\dropbox\www\tiff\thumbnails\architecture\calendar-bwl-projekt\thumbnail\bwl01.jpg"
If run this code from python - character '^' is ignored and resized image has size as '%sx%s' is passed not %sx%s^ - Why Python cuts '^' character and how to avoid it?:
def resize_image_to_jpg(input_file, output_file, size):
resize_command = 'c:\\cygwin\\bin\\convert "%s" -thumbnail %sx%s^ -format jpg -filter Catrom -unsharp 0x1 "%s"' \
% (input_file, size, size, output_file)
print resize_command
resize = subprocess.Popen(resize_command)
resize.wait()