Welcome Guest, Not a member yet? Register   Sign In
Cropping error
#1

[eluser]Céd'[/eluser]
Hi there,

Here's the problem : my script gets images from the user's computer, after having been successfully uploaded on the server, the user is invited to crop it manually (150*150 px) via an AJAX interface. Everything was OK, until i discover that some pictures weren't cropped correctly. Most of the time, the crop is generated correctly, but randomly i got some 150*130 px or 150*113px thumbnails.

If someone can help, it will be very appreciated.

Here's the configuration of the cropping script :

Code:
$config['image_library'] = 'GD2';
$config['library_path'] = '/usr/X11R6/bin/';
$config['source_image'] = $file;
$config['x_axis'] = $x_axis;
$config['y_axis'] = $y_axis;
$config['width'] = '150';
$config['height'] = '150';
$config['new_image'] = $path.'crop/'.$orig;
#2

[eluser]Céd'[/eluser]
Ok I got it... I forgot that config option :
Code:
$config['maintain_ratio'] = FALSE;

My bad... i'm a fool :-)




Theme © iAndrew 2016 - Forum software by © MyBB