Welcome Guest, Not a member yet? Register   Sign In
Square cropping from the center, is there an easier way? RESOLVED
#1

[eluser]JoostV[/eluser]
Hi,

I need to generate square thumbs for an image gallery. The cropping has to be done from the center. E.g. horizontal cropping would take a bit of the left side and off the right side of the image.

I tried using negative values for cropping, but it didn't work.

I found a solution for now, but I am not happy with it. I am sure there must be an easier way.

The way I do it now:
* Flip the image using $this->image_lib->rotate() ('hor' for cropping on x-axis, 'vrt' for cropping on y-axis)
* Crop from one side using $this->image_lib->crop()
* Flip again
* Crop from the other side

Anyone know a better solution?

Tnx in advance.


Messages In This Thread
Square cropping from the center, is there an easier way? RESOLVED - by El Forum - 04-02-2008, 03:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB