Reputation: 11806
This is an extension problem. Say I have a JPEG image with a .png extension. Let's call this file image.png
(keep in mind it's still internally a real JPEG). When I resize it (and overwrite) with:
convert -resize 100x100 image.png image.png
what happens is ImageMagick thinks I want to also convert the image to the real PNG format (since it's a JPEG but output file has a .png extension).
Is there any way to resize an image with ImageMagick without converting it to a format specified by the extension of output file? I just want this particular image to stay as a JPEG and without converting it to a real .png (image/png).
Upvotes: 1
Views: 246
Reputation: 24439
Just redirect it to stdout
convert -resize 100x100 image.png -format JPEG - > image.png
Upvotes: 0