![]() |
|
using printCustomSizedImageMaxSpace for video thumbs - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: using printCustomSizedImageMaxSpace for video thumbs (/thread-4089.html) Pages:
1
2
|
using printCustomSizedImageMaxSpace for video thumbs - gracestanat - 18-11-2008 I've seen a few posts on this, but no resolution. I would like to use printCustomSizedImageMaxSpace for thumbs, which is fine for pix, but seems to break for videos. It uses the actual video file instead of the same-name thumb, which totally makes sense because the function has no way of knowing whether you're trying to print a custom size of the actual image for display or for thumb purposes. So what we REALLY need is a separate function: Am I missing something? Is there a way to print custom sized thumbs that work correctly for video? Thanks in advance! using printCustomSizedImageMaxSpace for video thumbs - gracestanat - 22-11-2008 bump... help! using printCustomSizedImageMaxSpace for video thumbs - acrylian - 22-11-2008 Please try the latest nightly. using printCustomSizedImageMaxSpace for video thumbs - gracestanat - 22-11-2008 ok, but can you give me a bigger hint? i checked out the function descriptions for the nightly. unless i'm missing something, the CustomSizedImageMaxSpace functions do not have a parameter that determines whether the image to be printed is the actual image or the thumb. is there some way to tell the function this? class? id? i.e., i'm afraid i need a little more guidance in calling the custom sized thumb functionality - thanks in advance! using printCustomSizedImageMaxSpace for video thumbs - acrylian - 22-11-2008 The last parameter $thumbstanding has set to "true" if you want a thumb. The id is for a css id only.
Actually we are still not finished since new issues just occured but those only affect usage on image.php currently. This little function do somehow cause more overhead than expected... using printCustomSizedImageMaxSpace for video thumbs - gracestanat - 23-11-2008 okay - perfect! i misunderstood this because it only talks about watermarking. thanks very much! and yes, i've seen that this function is causing problems. but it is such a useful function and can used for so much, i think it's worth it. thanks very much for developing it! using printCustomSizedImageMaxSpace for video thumbs - acrylian - 23-11-2008 The currently nightly now also includes a variante called using printCustomSizedImageMaxSpace for video thumbs - gracestanat - 24-11-2008 Hmm... I seem to be having some trouble with this. I've tried to use printCustomSizedImageMaxSpace, but the sizing parameters don't seem to work correctly. AND it seems like it's cropping the images. Are these known issues? And the printCustomSizedImageThumbMaxSpace isn't working at all for me, but I think it might be something with my mbstring changing when I upgraded to the nightly build. Can't figure out how to change it back to UTF-8 since my config and ini files both already say UTF-8. Not sure that's the problem anyway. Any thoughts? using printCustomSizedImageMaxSpace for video thumbs - sbillard - 24-11-2008 There were still some problems with the functions. Try again with tonight's build. The issues are not with your mbstring setting, though. using printCustomSizedImageMaxSpace for video thumbs - sbillard - 24-11-2008 BTW, just curious. Any progress on the user document you were going to work on? using printCustomSizedImageMaxSpace for video thumbs - gracestanat - 24-11-2008 Yea, I posted this find elsewhere, but I'll repeat it here if it helps. Upon examining the thumb version of the function, I think it's not correct: function printCustomSizedImageThumbMaxSpace($alt='',$width,$height,$class=NULL,$id=NULL) { Shouldn't that second occurence be "printCustomSizedImageMaxSpace" instead of "printCustomSizedImageThumbMaxSpace"? The function is currently calling itself. -- Regarding the document, I'm hoping to get to it soon. I've been taking notes along the way, so that should help. I'm thinking that it should basically be a general help doc for people who live somewhere between completely non-technical and all you programmer types. It should also be useful to the completely non-technical folks, too. I've decided that my first priority will be to get my own site finally functional, and then turn to the document. I haven't really joined any of the programmer discussions yet, but will hopefully turn to that when I start working on the doc. using printCustomSizedImageMaxSpace for video thumbs - acrylian - 24-11-2008 The typo you describe has already been fixed in tonight's nightly..:-) I am looking forward to the document to see how you can make necessary technical stuff understandable to non-technical folks..:-) using printCustomSizedImageMaxSpace for video thumbs - gracestanat - 24-11-2008 okay - glad to hear that is fixed. so... can you tell me if I'm interpreting MaxSpace correctly? My interpretation is that the function decreases the image size as far as it has to so that the height AND width are both lower than or equal to the inputs to the function. Further, the image is not cropped. If this interpretation is correct, then I don't believe that the function is working properly. Is this a work-in-progress and should I just wait for a bit, or am I interpreting things incorrectly? using printCustomSizedImageMaxSpace for video thumbs - acrylian - 24-11-2008 You are interpreting the function correctly, that is how it is meant to work. But indeed it still does not work 100% correctly. It is still the nightly and with software in general, it is working properly until someone finds it is not...:-) I guess you need to wait a little more. using printCustomSizedImageMaxSpace for video thumbs - gracestanat - 24-11-2008 ok, thanks. for the record, it appears that the sizing portion of the function is not working properly. i'm getting all sorts of weird size results. using printCustomSizedImageMaxSpace for video thumbs - sbillard - 24-11-2008 Have you tried last night's build? If that is still giving problems we will need the images that are failing along with the parameters you are using. using printCustomSizedImageMaxSpace for video thumbs - gracestanat - 25-11-2008 yep, using last night's build. still not working correctly. here's a test gallery: look on the right for the number grid. the one on top uses my own functions, and the one on bottom, marked "MAXSPACE Version" uses the new functions. The images are supposed to max out at (120,100), but they don't. The call I'm making is: I've looked at the current code for the function and I haven't noodled all the way through it, but I think the sizing logic is faulty. I'm using this logic in my function:
This doesn't include the cases where $width or &height is not passed, but those simply fall into these same two categories. Obviously, the getCustomImageURL function can't be used by you guys in this situation since it doesn't deal with thumbs, but that's exactly why I'm waiting for this function. Hope this helps! using printCustomSizedImageMaxSpace for video thumbs - acrylian - 25-11-2008 Actually we know there is a bug somewhere. On a site I did I used this more (and perhaps overly) complicated code for the image on image.php but that was before we started to rework the maxspace functions. (500x380 is the size setting): using printCustomSizedImageMaxSpace for video thumbs - gracestanat - 25-11-2008 um... yes, that does seem a bit heavier than necessary, but it also seems correct, unlike the current code. simply, i think it makes most sense to use something like (syntax is wrong, but algorithm is the important part): case i think that should do it. using printCustomSizedImageMaxSpace for video thumbs - gracestanat - 03-12-2008 wondering if this has been resolved and i should install a new nightly build... |