jquerycropping,codiegniter,php
Posted
by user345804
on Stack Overflow
See other posts from Stack Overflow
or by user345804
Published on 2010-05-21T03:56:16Z
Indexed on
2010/05/21
4:00 UTC
Read the original article
Hit count: 220
I want to crop the image using jquery,codigniter
in jquery i get four coordinate of image x1=249 x2=326 y1=194 y2=271 w=77 h=77
in codiegniter done the query
function do_crop() {
$x=249;
$y=194;
$w=77;
$h=77;
$path= 'system/application/';
$config = array(
'image_library' => 'gd2',
'source_image' => $path.'/jag1/flowers.jpg' ,
'new_image' => $path.'/jag2/flowers.jpg',
'maintain_ration' => false,
'width' => $w,
'height' => $h,
'x_axis' => $x,
'y_axis' => $y
);
$this->load->library('image_lib');
$this->image_lib->initialize($config);
if ( ! $this->image_lib->crop())
{
echo $this->image_lib->display_errors();
}
$this->image_lib->clear();
}
i get cropped image. But problem is don't get exact cropped image x,y coordinate problem
© Stack Overflow or respective owner