erskinedesign / ed.imageresizer.ee2_addon

EE2+ Version of the ED ImageResizer. Resizes, crops and caches images on the fly.
43 stars 12 forks source link

crop ratio 1:1 doesn't produce exactly matching height and width. #9

Closed timprint closed 13 years ago

timprint commented 13 years ago

Hi

I'm using this: forceHeight="yes" maxHeight="250" forceWidth="yes" maxWidth="250" cropratio="1:1"

Mostly this is working fine but some of the images are coming out at 250px width by 251px height.

That extra pixel obviously causes issues when you try to float them up under each other in a flexible layout.

I understand it's a free extension and I know you're busy people but I thought I'd let you know. And if you do have any ideas for getting a perfect 1:1 crop I'd love to hear it.

If it's any help one of the ones being scaled to 250 x 251 is originally 1024 x 831.

jamiepittock commented 13 years ago

Hi Tim, I remember running into this one time but I don't remember how we got around it. What happens if you use cropratio="250:250" instead?

timprint commented 13 years ago

Weird timing. I just came back to this about half an hour ago and stumbled on a slightly hacky fix.

cropratio="1000:999" is producing 250px x 250px images. I have no idea why but everything seems to be working OK at the moment.

Thanks for coming back to me Jamie.