convert: Unrecognized option (-strip)

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
lucg

convert: Unrecognized option (-strip)

Post by lucg »

Hi,

My web hosting provider currently offered ImageMagick 5.4.7. When I run the following code

Code: Select all

system("exec 2>&1; convert temp/$file    -resize 400x500\> -quality 70 -density 72x72 -strip $newname");


I get an error message : convert: Unrecognized option (-strip). Is it because the strip option was implemented after version 5.4.7? If that's the case, is there a work around I could use to get the same result as strip?

Thanks.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: convert: Unrecognized option (-strip)

Post by Bonzo »

Try -thumbnail instead of -resize as that automaticaly strips the EXIF data etc.
lucg

Re: convert: Unrecognized option (-strip)

Post by lucg »

-thumbnail is not a recognized option.

Is there a file format that would not retain the info that -strip gets rid of? This way, I could convert my files to this file format first and then convert them back to jpeg.

Thanks.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: convert: Unrecognized option (-strip)

Post by Bonzo »

I am on a lot later version than you but your resize gives me a problem; what if you use this instead ?

Code: Select all

system("exec 2>&1; convert temp/$file -resize \"400x500>\" -quality 70 -density 72x72 -strip $newname");
Also if you run this it should give the information of what is and isn't supported in your IM setup.

Code: Select all

<?php
// Build the array of items to be used
exec("convert convert -list list", $IMarray, $code);
// Start the loop to find and display the results
foreach ($IMarray as $value) {
echo "<br>system (\"convert -list $value\")";
echo "<pre>";
system("convert -list $value");
echo "</pre><hr>";
}
?>
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: convert: Unrecognized option (-strip)

Post by anthony »

The equivalent option to -strip in IM version 5 was +profile '*'.

You version of IM however is more than 7 years old!!!!!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply