I am new to IM and tryign to create a flop of an jpg, and concatenate the orginal and the flopped image back together. Script below:
convert %%a -flop %%a
convert %%a -flop b.jpg
montage %%a b.jpg -mode Concatenate -tile 2x %%a
del b.jpg
The script works, but I loss image quality on some of the jpgs (others work fine). Any ideas how to fix? PLEASE I need your help...
Thanks,
John
JPG Image Quality Loss - what do I do???
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: JPG Image Quality Loss - what do I do???
JPG is a lossy compression. So use something like PNG for any intermediate step that you have to save.
but there is a simpler way (in windows syntax)
convert image.jpg ( -clone 0 -flop ) +append result.jpg
see parenthesis processing and clones and append at:
http://www.imagemagick.org/Usage/basics/#parenthesis
http://www.imagemagick.org/Usage/basics/#seq_combine
http://www.imagemagick.org/script/comma ... rn7#append
but there is a simpler way (in windows syntax)
convert image.jpg ( -clone 0 -flop ) +append result.jpg
see parenthesis processing and clones and append at:
http://www.imagemagick.org/Usage/basics/#parenthesis
http://www.imagemagick.org/Usage/basics/#seq_combine
http://www.imagemagick.org/script/comma ... rn7#append
Re: JPG Image Quality Loss - what do I do???
Thanks for the response. Do you happen know of anyway to accomplish this task in a batch process and keep the image quality? -Thanks so much...
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: JPG Image Quality Loss - what do I do???
You could script a loop to process every image in some directory with the above command. This is the only way I know. I could script this in Unix/bash, but I am not a Windows user nor do I program DOS shell/Bat scripts.
The only suggestion again is to avoid saving too many times to jpg and to use -quality to control compression vs quality. Or use lossless jpg (JP2 format) or something such as GIF or PNG.
The only suggestion again is to avoid saving too many times to jpg and to use -quality to control compression vs quality. Or use lossless jpg (JP2 format) or something such as GIF or PNG.
Last edited by fmw42 on 2012-03-08T21:52:05-07:00, edited 1 time in total.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: JPG Image Quality Loss - what do I do???
GIF is far from 'lossless' for non-cartoon-like images. Its saving grace is its ubiquitous availability and use for animations on web pages.
PNG is the way to go. MIFF for temporary intermediates, and MPC for extremely temporary saves.
PNG is the way to go. MIFF for temporary intermediates, and MPC for extremely temporary saves.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/