Is this possible with imagemagick

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
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Is this possible with imagemagick

Post by Bonzo »

This code when it is run will resize and OVEWRIGHT all the jpg images in the folder:

Code: Select all

<?php
exec("/usr/local/bin/mogrify -size 45x *.jpg" );
?>
Problems:
1/ On my server I have to use an FTP program to CHMOD all the images to 777 first - you may or may not have this problem.

2/ You would need to run it in each folder - if you knew a bit about php you could write some code to do this automaticaly.

I do not want to get the blame for someone overwiting there images by accident so again THIS WILL OVERWRITE THE ORIGINAL IMAGES.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Is this possible with imagemagick

Post by anthony »

See the mogrify alturnatives in IM Examples
http://www.imagemagick.org/Usage/basics/#mogrify_not
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply