CodeIgniter Forums

Full Version: Implementing Jcrop to CI? (jQuery Image cropper)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


I was wondering on how I might be able to implement Jcrop to CI using the Image Manipulation class.

From what I gather I'd need to alter the following script:


$targ_w = $targ_h = 150;
$jpeg_quality = 90;

$src = 'demo_files/flowers.jpg';
$img_r = imagecreatefromjpeg($src);
$dst_r = ImageCreateTrueColor( $targ_w, $targ_h );


imagejpeg($dst_r, $output_filename, $jpeg_quality);

I've noticed a couple of parameters I'd know how to use with the class but I'm a bit confused about the rest. I'm not too familiar with GD so I wouldn't know to apply the code. Could somebody possibly help me? (Also I noticed that supposedly above only works with jpegs, how would I make it work with gifs and pngs as well?)

Thanks in advance.