Is it possible to apply the custom thumbnail cropping to a larger image?

The "custom thumbnail cropping" feature is great because we want some pictures to be cropped centered, some to the lower left, some to the upper right, etc. So, we use (slightly modified versions of) printAlbumThumbImage and printImageThumb to display all thumbs.

Now, like zpMasonry, we want to display a random slideshow with regular size (non-thumb) images (say 528x528). However, unlike zpMasonry, we want the images cropped the same as the thumbs.

If we use the same process as printAlbumThumbImage and printImageThumb (use an <img src=...> tag with larger width= and height= parameters), the image is blurry (low res pic blown up).

And if we use the printCustomAlbumThumbImage or printCustomSizedImage or printRandomImages method, the images are cropped and clear, but do not honor the "custom thumbnail cropping" (all cropped to center or top left).

Is there a way to apply the custom crop to a regular size picture and still get a sharp image?


  • acrylian Administrator
    Only default image functions like printAlbumThumbImage and printImageThumb will honor the custom cropping set on the backend tool. This means one general size to all of them. There is no way to do this for different sized images.

    If you need other sizes you have to use custom image functions on your theme directly that overrides settings of the backend. There are several parameters to these custom function as available.

    All these function use the same image processor. See /zp-core/i.php the comments in the head of the file.

    I cannot help with the specifics of zpMasonry as I don't know the theme.
  • You can retreive the custom cropping values from the image object. use the `obj->get('thumbX');`, etc. method to get the X, Y, H and W values and pass them to the appropriate parameters of hte custom function.
Sign In or Register to comment.