Welcome Guest, Not a member yet? Register   Sign In
CI image library crop problem
#1

[eluser]bogdan3l[/eluser]
Hello!

I have a problem with CI image library crop.

I resize & crop multiple images automatically and everything works just fine.

My final image will have 200px - 133px but:

When i resize an image and after resize the image will have a smaller height than 133px i will end up with a black space.

Example:
-------------------------------------------------------------------------
If the image has 100px after resize i will end up with black zone of 33px.

And my question is: how i can transform that black in white Smile ?

I don't have control over the uploaded images, everything is automatically.

// Crop
$config['image_library'] = 'gd2';
$config['source_image'] = 'my_path_here';
$config['height'] = 133;
$config['quality'] = '100%';
$config['maintain_ratio'] = FALSE;

$this->image_lib->clear();
$this->image_lib->initialize($config);
$this->image_lib->crop();

Thanks a lot, and sorry for my bad english!




Theme © iAndrew 2016 - Forum software by © MyBB