Page 1 of 1

CGSmartImage filter_croptofit problem

Posted: Fri Dec 20, 2013 2:43 pm
by hgpdesign
Hello everyone,

I have a small problem using CGSmartImage. I want to perform a croptofit action on a image that has only to be cropped in height. F.i. my image is now 924x616px and it has to be cropped to 924x520px. I therefor use this code:

Code: Select all

{CGSmartImage src=$file filter_croptofit='924,520,c' quality=100 noembed=1}
The result I get is an image which is 924px wide but the height is scaled down to 520px instead of cropped to 520px.

I can't see what I am doing wrong. Can someone help me out?

Thanks in advance.

Kind Regards,

Ron Hoenson

Re: CGSmartImage filter_croptofit problem

Posted: Fri Dec 20, 2013 5:27 pm
by velden
could it be that the height is scaled due to stylesheet rules or height attribute in img tag?

In that case it might be possible that cgsi did not change the image file.

Re: CGSmartImage filter_croptofit problem

Posted: Fri Dec 20, 2013 7:33 pm
by hgpdesign
Thanks for your replies.

So, if I understand it correctly there is no way to crop an image from 924x616px to 924x520px with GCSmartImage?

If I do a 'croptofit from f.e. 924x616 to 922x520px is works perfectly fine...).

Thanks again and kind regards,

Ron Hoenson

Re: CGSmartImage filter_croptofit problem

Posted: Fri Dec 20, 2013 11:21 pm
by calguy1000
So, if I understand it correctly there is no way to crop an image from 924x616px to 924x520px with GCSmartImage?
Not currently. Besides your 'crop' would result in an upscale, which CropToFit won't allow by default.