accessing custom thumbnail

Hi,
I am using zenphotopress to access my zenphoto gallery on my wordpress blog. The problem is that I have defined custom crop zones for the thumbnails of my images under zenphoto, but these are never used when trying to access them using zenphotopress which get the thumbs using an url like "http://mysite/zenphoto/zp-core/i.php?a=my album name&i=my_photo_file.jpg&s=thumb".
This url always returns the 'default' thumbnail as if I had never defined a specific-one.
Basically, when generating the cache for my images and corresponding thumbnails, my custom thumbnail is created with a name like "myimage.jpg_w180_h180_cw643_ch643_cx571_cy187.jpg" and the thumb it tries to load using the previous url is "myimage.jpg_180_cw85_ch85_thumb.jpg", which is apparently the 'default' one.
Question: is it a problem in the way zenphoto converts the url to the photo thumbnail location ? Or is it a problem from the zenphotopress plugin and in that case, what is the url that would return the correct modified thumbnail ?
Thanks for everthing, zenphoto is really the best online photo gallery management, and I've tested a lot of them...
Best regards,
Romain

Comments

  • Ok, I've been deeper into the i.php file.
    From what I've understand, 's=thumb' parameter would return a default thumb version, and I need to explicitly specify the crop x, y, w & h to get the custom one.
    Is that true ? In that case, are there no possibilities to just ask for the custom thumbnail that has been defined in the admin pages ? something like "s=custom_thumb" ? That would be really useful !
    Best regards,
    Romain
  • acrylian Administrator, Developer
    `s=thumb` is actually simply wrong...;-) `s` and all the other parameters like c, cx etc. need to have numeric values set (as you see in the filenames). "http://mysite/zenphoto/zp-core/i.php?a=my album name&i=my_photo_file.jpg&s=500" would return an uncropped image with the longest or shortest side (depending on the admin option) of 500px.

    The parameters are documentated on top of i.php itself.
  • No, s=thumb does indeed give the standard thumbnail image. For a custom thumb (or other custom image) you need to provide the appropriate parameters. We have no intention of creating a "custom thumb" parameter since it is not needed. Just provide the parameters you desire.

    I suggest you see what gets generated for custom thumbs by the custom thumb functions and just use that. Not all parameters are needed, it depends on what you want.
  • I understand that, but as we have the possibility to define a custom thumbnail for each image using the admin-thumbcrop.php file, it think it is logical when asking for the thumbnail of an image to have indeed the specified zone, otherwise what's the point of being able to specify a crop zone if you have to resend all the parameters each time you want to get the thumbnail ?
    By the way, I do not have access to the cx, cy, cw and ch parameters outside zenphoto and I should not have the bother with them as I have already defined them in zenphoto using the admin-thumbcrop, no ?
    Maybe I miss something... sorry if my questions seems strange...
  • I guess you don't understand. What you have is a custom cropping of the standard thumb size. Not a custom thumb.
  • Yes you are right ! Sorry if i choose the wrong term, I had a hard time to explain this in english :)
    I don't want to modify the size of the thumbnail, I'd just like to get my custom cropping whenever I (understand zenphotopress) ask for the thumbnail.
  • The crop information is in the image record, so you can retrieve it.
  • Yes I know that the information is in the database, but my current knowledge of php and javascript sucks a little :)
    Anyway that means the modifications have to be done in zenphotopress to retrieve the crop information and provide it in the URL when calling i.php if there is no possibility for it to tell i.php : "please use the custom crop information define for this image".
    Thanks,
    Romain
  • acrylian Administrator, Developer
    Cool, I did indeed not know about `s=thumb` somehow...:-)
  • Ok, just in case someone else is interested, I've modified the zenphotopress plugin so that when custom cropping zones have been defined they are taken into account in both the badge and the photo import. I do not publish the modifications because... that's not really really clean atm (should take some time to also retrieve the default thumbnail size... currently it is hardcoded for my needs).
    Feel free to ask if you need to modifications.
    Thanks to all the zenphoto team for this great software !
    Romain
Sign In or Register to comment.