Welcome Guest, Not a member yet? Register   Sign In
image_lib->crop()
#4

[eluser]Thorpe Obazee[/eluser]
[quote author="AdamCMills" date="1244533902"]This seems to do nothing ... I am running it here:

http://myvaluecoupons.com/user_panel/avatar_upload

log in
user: test
pass: test!
if you upload an image
drag on the large version to create crop marks (should see a preview of how it should look)
then click the "crop" button, you'll see it seems to do nothing. This is the code I have running:

Code:
$config['image_library'] = 'gd2';
$config['source_image'] = $this->session->flashdata('file');
$config['x_axis'] = $_POST['x'];
$config['y_axis'] = $_POST['y'];
$config['maintain_ratio'] = FALSE;
        
$this->load->library('image_lib', $config);
if ( ! $this->image_lib->crop()){
     echo $this->image_lib->display_errors();
}
echo '<img src="'.substr($config['source_image'],1).'" />';

if I set a height ... it does something just not very much ... any help on how exactly to get this crop to show up, and correctly would be greatly appreciated.[/quote]

Try using
Code:
$this->load->library('image_lib');
$this->image_lib->initialize($config)
instead of
Code:
$this->load->library('image_lib', $config);


Messages In This Thread
image_lib->crop() - by El Forum - 06-08-2009, 08:51 PM
image_lib->crop() - by El Forum - 06-08-2009, 08:54 PM
image_lib->crop() - by El Forum - 06-08-2009, 09:08 PM
image_lib->crop() - by El Forum - 06-08-2009, 09:29 PM
image_lib->crop() - by El Forum - 06-08-2009, 09:34 PM
image_lib->crop() - by El Forum - 06-08-2009, 09:39 PM
image_lib->crop() - by El Forum - 06-08-2009, 09:50 PM
image_lib->crop() - by El Forum - 08-11-2009, 02:35 PM
image_lib->crop() - by El Forum - 08-29-2009, 02:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB