I got a little problem with my generated thumbnails.
I am using the API to get the ID by Path method (php method: GalleryCoreApi::fetchItemIdByPath(xyz.jpg") ).
Once I got the ID of the picture, I juste call the picture with my gallery server path (which looks like: www.myserver.com/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=xyzID).
Already here, I don't know if I'm taking a good path to do that.. Anyways, it works.
But now, I want to have 5 sizes of thumbnails (the biggest one is 500x500 criteria). So the picture IDs are incremental, for example:
- original picture ID = 450
- then the first thumbnail ID would be = 451
- the second 452
- third 453
- fourth 454
- fifth 455
- the next ID (456) wouldn't be the same picture as requested, because it generated 5 thumbnails. But that is okey.
But now, if I add a new image, which size is lesser than 500 pixels, the thumbnail will not be generated. So, the *rule* with incrementing ID's to get the next thumbnail size won't work; because the picture will change (thumbnail not generated, because original picture to small).
So there would be several solutions:
- forcing to enlarge the picture, that it has minimum 500x500 pixels
- forcing to create thumbnails, even if it doesn't have the good size
- method from api which tells me if a pictureID is the same picture as another pictureID
- method from api which gives me all IDs of a picture
or maybe I'm totally wrong, but it would be very helpfull if someone knows something about that
Thank you very much,