AutoNav Graphical Navigation and Gallery Plugin
[resolved] Cropping from the top-down (4 posts)

  1. zorbs
    Posted 5 years ago #

    Cropping seems to start from the center of an image shooting outwards.
    Can cropping commence from the TOP of the image instead?

    This would be ideal in some portrait photos or website screenshots, where the top part should be part of the thumbnail.

    A global setting to set this throughout the plugin would suffice.

    Thank you!

  2. zorbs
    Posted 5 years ago #

    For now, I have added two lines above imagecopyresampled(..), on or about line 115, which forces cropping to start from the top left (just for the default "sharp" setting of "smooth".
    Hacked segment shown below:

    $src_x = 0;
    $src_y = 0;
    imagecopyresampled( $to_image, $from_image, $dst_x, $dst_y, $src_x, $src_y,
    $dst_w, $dst_h, $src_w, $src_h);

    Ideally, this should be a setting in the admin.

  3. wlindley
    Plugin Author

    Posted 5 years ago #

    Thanks... I am working on 1.3.9 and hope to include this.

  4. wlindley
    Plugin Author

    Posted 4 years ago #

    The current version of AutoNav supports the crop parameter as follows:

    • crop="0" Fits image into size, maintaining aspect ratio and centering image
    • crop="1" Crops images to fit exact size
    • crop="2" Crops image from upper-left
    • crop="3" Crops from top middle (useful with head-and-shoulders portraits)

    The same values may be used in as the default in the Admin screen.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic