I have this class from Ian Selby.
Let’s say I have a 1024×768 image. I would like crop 230×53 from the center of that image, so that, a 230×53 thumbnail image appears.
However, I’m always getting a 230×230 instead.
The issue line:
$thumb->cropFromCenter(230, 153);
Have anyone experience this kind of situation? And if so, what did you do to solve it?
The context:
$fileThumb = "./lib/galeria/thumb".$r["anexo"];
if (!file_exists($fileThumb)){
$thumb = new Thumbnail("lib/galeria/".$r["anexo"]);
$thumb->cropFromCenter(230, 153);
$thumb->show(100,$fileThumb);
}
The class version that I’m using is: 1.1 – I know that we can find a new one, but at the time of this writing, the owner site is offline for hours.
Thanks a lot,
MEM
It seems that, at least for this version, the cropFromCenter, generates a square.
So, I end up adding a new method, very similar with a few changes.
Regards,
MEM