![]() |
|
Multiple Image Sizes + Cropping - 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: Multiple Image Sizes + Cropping (/thread-435.html) Pages:
1
2
|
Multiple Image Sizes + Cropping - nathan - 2006-04-25 I want to CROP it to the new aspect ratios, instead of simply resizing it. I don't want distorted images, but I do require them in the different (obscure) sizes, so resizing AND cropping of the image is required for my purposes. You can see what I mean with the image sizes that I need to generate. I posted those a few comments ago. Thanks for keeping me informed of your progress and for keeping an interest in this discussion. Multiple Image Sizes + Cropping - trisweb - 2006-04-25 The latest in SVN should do what you want. Use the new template functions... look for them in the php file, or in the updated stopdesign theme, which is now checked into SVN (shh ;-). Also look at the comment at the top of i.php for full documentation on the URI parameters. What you'll want is to use either ?h=768 or ?w=xxx and then crop the other dimension. In your case, fixing the height is the way to go. So like, And this is fun stuff. Probably my favorite part of this project. It allows for a lot of power and opportunity to streamline, so it's fun to program. :-) Thanks for using it. Multiple Image Sizes + Cropping - nathan - 2006-04-25 No, thank you for making it. I will give it a quick go tonight (now) and let you know how it all works. I can't see why it wouldn't. Thanks again. Multiple Image Sizes + Cropping - nathan - 2006-04-25 Right. This version of trunk is not the most stable of versions. Can I replace the following files in a stable release and have the functions work?:
I can't see why that would not work. Multiple Image Sizes + Cropping - trisweb - 2006-04-25 Not the most stable? Please, do tell... It's quite stable for me; the main problems you're seeing are probably config changes -- fill out the new zp-config.php file instead of your old config.php and it should work fine... And no, you can't just bring in the new files; they're dependent on some of those config changes. They're good changes, so it's worth it, trust me. Multiple Image Sizes + Cropping - nathan - 2006-04-25 Okay. It all works. Thank you. I do however have 1 more request (please don't hate me :-P ).
I was using (before all the cropping came into it all) the As I am generating all the images on the fly for every desktop picture I have, I can't (and don't want to) hard-code the image links into the template. Can I make a final request, where I can have a function that allows me to parse all the values, or, a few little functions that will allow me to procude a link like the following: I am generating the same sized images all the time, so I would place that link, or something like it in the/a template file. That way, with every image, I have the selection/links to download the other x (in my case 3) image sizes. I hope that made sense. And I am sorry to do this to you once again. Multiple Image Sizes + Cropping - nathan - 2006-04-25 Quote:Not the most stable? Please, do tell... It's quite stable for me; the main problems you're seeing are probably config changes -- fill out the new zp-config.php file instead of your old config.php and it should work fine... And no, you can't just bring in the new files; they're dependent on some of those config changes. They're good changes, so it's worth it, trust me. Sorry for the double post (again). I only just got it. Multiple Image Sizes + Cropping - trisweb - 2006-04-25 Right, so just use the image loop, like in any of the themes (use one as an example) and for each image, print out its link using the getCustomImageURL(...) function. That part's easy, and I thought you knew that already ;-) Just look at the themes, all the loops are set up. You don't need to "get" the album or image names, hehe Your getCustomImageURL would look something like...
The first two are $size and $width, which you don't want, so keep them null. This would go in the image loop, and would produce links to those sized images for each image in the album. Hope this helps! I really should put up some better documentation so this stuff makes more sense... Multiple Image Sizes + Cropping - nathan - 2006-04-25 Ah. I see. I did NOT update to the latest SVN. I managed to get it working on the other build. My fault. Sorry to bother you with that. I did not see that function there. All working now. Multiple Image Sizes + Cropping - trisweb - 2006-04-25 Excellent. Can I see what you're doing with it? I'm imagining some kind of wallpaper site... Multiple Image Sizes + Cropping - nathan - 2006-04-25 For sure you can see. It is local for the time being, but as soon as it goes live, I'll put a link up here. Multiple Image Sizes + Cropping - 3stripe - 2006-04-25 Ahhh wallpaper autosizing, nice idea! (About to post some wallpaper to a site actually) Multiple Image Sizes + Cropping - detayls - 2006-05-02 OK. This is all waaaay too confusing for my poor little brain and I see no way to add a new topic. Please could someone summarize the changes and point me to a set of instructions? My site is functioning quite well with the K2 theme and WordPress integration called ZenPress at www.detayls.com. The two issues that I have are cropped thumbnails and strange asapect ratios of the normal image. Since I have uploaded mostly 640x480 JPGs and specified a thumbnail size of 120 x 90 (as far as I recall), I was expecting to see the images simply resized as thumbnails. Instead they are cropped from the center. When viewing portrait images the K2 theme appears to be forcing a "squeeze" on the image and they are showing at closer to square aspect ratios. How do I avoid this? Thanks. |