Skip to content

width and height is not max as expected #6

Open

Description

@anselmh

Hi,

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?

Activity

  1. bfncs commented on Dec 9, 2011

    @bfncs

    I can reproduce the problem and don't find a solution for it, too.

  2. bfncs commented on Dec 10, 2011

    @bfncs

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions