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?".
I believe Imagemagick opens an image and saves it; even if nothing is done and so in your case uses jpg compression.
You can check the image size first and only open the image if needs resizing. Get the size from identify, possibly ping the image to get the dimensions or use another piece of software to find the sizes.
I think you are right Bonzo : a preliminary test is necessary in order not to modify the file
IM should be able to follow the final absence of modification for finally not waste time to compress and save the "same" file...