Crop images with Image Manipulation Class |
[eluser]waynhall[/eluser]
I recently was able to make some square thumbnails, but I found the ImageMagick class of PHP to work better than CodeIgniter in this instance. Here is a function in my photos controller that I used to generate thumbnails for an entire directory. It doesn't involve any client-side customization; it just automatically generates the thumbnails, but maybe you can figure something out from the documentation at: http://php.net/manual/en/book.imagick.php (Note that I'm saving pngs, not jpgs) (You'll need imagemagick and php5-imagick (On Ubuntu: sudo apt-get install imagemagick php5-imagick) Code: private function _make_thumbs($dir) { |
Messages In This Thread |
Crop images with Image Manipulation Class - by El Forum - 07-27-2011, 08:06 AM
Crop images with Image Manipulation Class - by El Forum - 07-28-2011, 05:42 AM
Crop images with Image Manipulation Class - by El Forum - 07-28-2011, 07:08 AM
Crop images with Image Manipulation Class - by El Forum - 07-28-2011, 07:25 AM
Crop images with Image Manipulation Class - by El Forum - 07-28-2011, 07:41 AM
Crop images with Image Manipulation Class - by El Forum - 07-28-2011, 07:45 AM
Crop images with Image Manipulation Class - by El Forum - 02-28-2013, 08:08 AM
|