Minimum resolution - Force enlarge, API IDs
kakmael
Joined: 2011-09-01
Posts: 12 |
![]() |
Hello everybody! I am using the API to get the ID by Path method (php method: GalleryCoreApi::fetchItemIdByPath(xyz.jpg") ). 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: or maybe I'm totally wrong, but it would be very helpfull if someone knows something about that Thank you very much, |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
I'd use mediaBlock w/ g2_maxImageWidth and g2_maxImageHeight parameters. -s |
|
kakmael
Joined: 2011-09-01
Posts: 12 |
![]() |
Hey! Thank you for the fast reply! I tried it, and it looks like something I could use I tested the parameters, and now I've got a few questions. I used "@readfile("http://localhost:8080/PhotoGalleries/gallery2/mediaBlock.php?g2_itemId=349&g2_maxImageHeight=50&g2_maxImageWidth=50");" - I observed that the minimum value of the sizes is 100 (is it possible to go under 100?) and the maximum is 500 (after that it shows the original file). Sorry if those questions are newby ones! Thank you, |
|
kakmael
Joined: 2011-09-01
Posts: 12 |
![]() |
OH.. okey... I took a break, and now I just found the 2 options for the shadow and the link... *hum hum* (&noLink=1&noShadow=1), sorry. There is still the question about the minimum size that is fixed to 100 Thanks! |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
mediaBlock finds the closest match to the size parameters you specify. -s |
|
kakmael
Joined: 2011-09-01
Posts: 12 |
![]() |
Aaahh okay! So it still uses the thumbnail sizes, didn't got that. So that's perfect! The "return" value automatically comes in a table. I have several different picture request (in a foreach), so the page shows a lot of tables. Is it possible to get ride of it? Didn't find any options (and I looked twice this time). Thanks a lot! |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
it only presents thumbs if useThumb=1 is set, but the thumbs are considered in the maxImage size query - all sizes are. I could make this version available this weekend. -s |
|
kakmael
Joined: 2011-09-01
Posts: 12 |
![]() |
Mmhh, the thing is that at the end I only need one picture at time, without any styles or tables.. really only the picture. (or the ID of the picture/thumb). I don't want to make you work more for me! :D Again, thank you for your assistance. |
|