Detection and elimination of progressive JPG

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?".
Post Reply
MajkiFajki
Posts: 2
Joined: 2011-03-26T16:23:56-07:00
Authentication code: 8675308

Detection and elimination of progressive JPG

Post by MajkiFajki »

Hello Everyone


I am doing a map for FPS game based on Quake3 engine. When it compiles, it's using textures of my choice. Problem occurs, when some jpgs are progressivly compressed. My dream is to with one command eliminate all progressive JPGs. For now, I have used this command in textures folder:
mogrify -format jpg *.jpg
I did not add any "quality" option, I want to not compress at all:)


Will this do the trick - eliminate all progressive images and overwrite them with no-progressive jpgs?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Detection and elimination of progressive JPG

Post by fmw42 »

I suspect so as progressive is not the default. But you will lose quality by decompressing and recompressing potentially to a different quality level than your original. By eliminating the -quality you will get a default quality. The default is to use the estimate quality of your input image otherwise 92. But -quality 100 is no guarantee that you will get no recompression. For that you need to use JP2 format (JPEG2000).

see
http://www.imagemagick.org/Usage/formats/#jpg_write
http://www.imagemagick.org/Usage/formats/#jpg_non-im
http://www.imagemagick.org/script/comma ... c7#quality
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Detection and elimination of progressive JPG

Post by anthony »

WARNING reading and writing JPEG is NOT recommended. Writing JPEG will loss quality. It is a function of the file format.

See http://www.imagemagick.org/Usage/formats/#jpg

You may be able to convert JPEGS without loss with "jhead" program, but I havent looked myself.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
MajkiFajki
Posts: 2
Joined: 2011-03-26T16:23:56-07:00
Authentication code: 8675308

Re: Detection and elimination of progressive JPG

Post by MajkiFajki »

Thanks for answer.

Mogrify did the trick - map stopped crashing game engine. So whatever was inside this jpgs, mogrify cleaned that up:)
Post Reply