Welcome Guest, Not a member yet? Register   Sign In
Image Resizing
#1

[eluser]wakey[/eluser]
I just can't work out where I am going wrong with this.

I am uploading an image, then resizing it, this is all working fine.

I am then trying to create a second version of the image to use as a thumbnail with the dimensions 130x130. However, it seems to be maintaining the ratio as the output is always 130xrandom.

Any idea where I'm going wrong?

Code:
$configThumb['image_library'] = 'imagemagick';
$configThumb['library_path'] = '/usr/bin/convert';
$configThumb['new_image'] = './media/images/thumbs/';
$configThumb['source_image'] = './media/images/'.$file_name.'';
$configThumb['quality'] = 70;
$configThumb['width'] = 130;  
$configThumb['height'] = 130;
$configThumb['maintain_ratio'] = FALSE;
                                
$this->image_lib->initialize($configThumb);
$this->image_lib->resize();
$this->image_lib->clear();
#2

[eluser]mi6crazyheart[/eluser]
I've also little bit stuck in this image related problem. Hope, if any one know how to solve this issue give some light at here... Smile
#3

[eluser]mdhb2[/eluser]
for image processing such resize,crop etc personally i prefer use phpThumb, it easy to implement like :

Code:
<img src="phpthumb.php?image_source.png&w=100&h=100&zc=1">

and they do caching feature Big Grin
#4

[eluser]umefarooq[/eluser]
hi you can find helper from this post and it works great to create images thumb

http://ellislab.com/forums/viewthread/157314/
#5

[eluser]wakey[/eluser]
Just to update this post:

Thanks for the link to the helper, was good to see.

My code works with the GD2 library, just not ImageMagick! So I've changed to GD2!!




Theme © iAndrew 2016 - Forum software by © MyBB