• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Implementing Jcrop to CI? (jQuery Image cropper)


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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.