stevenbenner/codeigniter-image-magician

Unable to access imagemagick

Closed this issue · 2 comments

Hey Steve! Thanks for making this library, it's exactly what I've been looking for. I know it's been a few years since you've updated it, do you know if it's compatible with Codeigniter 3? I'm super new to using imageMagick and I'm having trouble getting it to interface with this library. I know imageMagick is working correctly because I can run command line commands without issue. To use this library are there any other dependencies I'm missing? Do I need to install the imageMagick PHP extension?

Thanks!

I actually haven't CodeIgniter in years now (not since 2.x was abandoned), so I'm not sure if it's compatible with CI 3. The way I understand it there were many major changes in 3.0, so it's quite likely that this project isn't compatible.

That said, if you're sure imagemagick is installed and that this code is being executed properly then it is probably a config thing. You need to inform this library what the path to the IM executable is.

By default it assumes that the mogrify and convert binaries are in /usr/bin. This may or may not be correct in your environment.

Example:
https://github.com/stevenbenner/codeigniter-image-magician/blob/master/libraries/Image_magician.php#L17

    // Example path override for Windows systems:
    // $config['imagemagick_path'] = 'C:\Progra~1\ImageMagick-6.6.6-Q16\\';
    // $this->load->library('image_magician', $config);

Cool, I'll give that a whirl. Thanks for the help!