PDA

View Full Version : ImageMagick profile removal - support for -strip [PROPOSED FIX INCLUDED]


DavidW
18th of October 2006 (Wed), 21:29
Modern versions of ImageMagick support -strip (http://www.imagemagick.org/script/command-line-options.php#strip) to remove the profiles; in fact, -strip is the only way I seem to be able to get a ~3KByte file from the test on my own server. All the +profile options built into EE2 don't work on that server.

My test server has ImageMagick 6.2.9; the very latest is 6.3.0, which I'll pick up on there when the FreeBSD port is updated. I think we might be in ports freeze prior to the release of FreeBSD 6.2, but it will happen soon I expect.


Anyway - the fix is to add two lines to EDITOR_server_tools.php in the management folder.

After line 165:
if ($new_im_profile == "4") $new_im_profile_to_sql = "-strip";

After line 847:
if ($im_profile == "-strip") $im_profile_menu = "4";

Can I also suggest that -strip is the default for new installations when the installer comes out.



David