CodeIgniter Forums
Implementing Jcrop to CI? (jQuery Image cropper) - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Implementing Jcrop to CI? (jQuery Image cropper) (/thread-15339.html)

Implementing Jcrop to CI? (jQuery Image cropper) - El Forum - 02-01-2009


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.