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.
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, i.php?a=album&i=image.jpg&h=768&cw=1024 will get you a 1024x768 image with the sides cropped off. You can then play with &cx=n to adjust the crop position if you can work out a way to do it for each image... (that's something I'm working on ;-)
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.
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.
Okay. It all works. Thank you.
I do however have 1 more request (please don't hate me :-P ).
I would like to do all of this dynamically, and I was wondering if there are any, or if you can add some functions to at least get the following.
I was using (before all the cropping came into it all) the getSizedImageURL function, but this only supports the s value.
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.php?a=&i=h=768&cw=1024
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.
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.
The problems are not for this thread. I will open up another one. It is basically what you described, especially with the setup of app.
Sorry for the double post (again). I only just got it.
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...
getCustomImageURL(null, null, 768, 1024)
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...
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.