You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in MODx phpthumbof w(idth) and h(eight) attributes are not the maximum width and maximum height as documented in phpthumb here: http://phpthumb.sourceforge.net/demo/docs/phpthumb.readme.txt
phpthumbof generates the thumbnail in the given value as standard width even its original image is smaller than given value.
Can you reproduce that oder do you need futher information?
Did some further investigation into this before I recognized, that the problem is just the default settings.
In modX system settings, the default value for phpthumb_far is C, which means that the aspect ratio is forced to your values for w and h.
To prevent this, you can either:
change the value for phpthumb_far in modX system settings to 0 to change this site-wide, or
call phpthumbof like this: [[*myImg:phpthumbof=w=300&h=300&far=0]] to change it only for one image.
So, no bug here, everything working fine. Developers should just think about whether it might be more intuitive to disable fixed aspect ratio by default, since it would resemble the default behaviour of phpthumb closer. This should at least be pointed out in the documentation.
Activity
bfncs commentedon Dec 9, 2011
I can reproduce the problem and don't find a solution for it, too.
bfncs commentedon Dec 10, 2011
Did some further investigation into this before I recognized, that the problem is just the default settings.
In modX system settings, the default value for
phpthumb_farisC, which means that the aspect ratio is forced to your values for w and h.To prevent this, you can either:
phpthumb_farin modX system settings to0to change this site-wide, or[[*myImg:phpthumbof=w=300&h=300&far=0]]to change it only for one image.So, no bug here, everything working fine. Developers should just think about whether it might be more intuitive to disable fixed aspect ratio by default, since it would resemble the default behaviour of phpthumb closer. This should at least be pointed out in the documentation.