Yeah… did you grab the latest version of my post? I goofed up one of my variable names earlier.
I used the code you posted the last time…something wrong in that code?
copy and repaste it just to be sure, i edited it last at 20:06 local (Your last post was 20:23, for reference)
I’ll have a look at it tomorrow. Thanks
I used your new code and now it seems to work.
One thing though. The quality of the cropped thumbnail is pretty poor.
Is that because it basically have to do two changes from the original full size photo? Meaning original is full quality, first thumbnail is less and finally the cropped loses even more quality.
Normally when you resize from big to small it get’s more a fuzzy/blury look. But this cropped image has more of a look where it looks like it has been sharpened several times.
I guess there is no way of getting a better quality for the cropped thumbnail?
If I want to change the cropped thumbnail width and height, where do I do that?
I tried to change the following to 200 in width and height.
// DEFINE THE CROP SIZE
$width = 200;
$height = 200;
But it still seems to keep 100 in width when it’s displayed.
disregard the last thing about height and width. I refreshed the page and that fixed the problem. The old image width/height was probably in the browser memory or something.
Someone said previously to save a temp image as PNG to avoid jpg compression.
Do you know if that can be used to get better quality for the final cropped thumbnail?
here is that text from that guy:
[COLOR=“RoyalBlue”]"I would say that you need to resize the image so that the shortest side is to the final dimension you want and then crop it. I do not use GD and am unsure if you would need to save an intermediate image or if you could do it all in one go.
I would start simple and run your first code to resize the image and save as a tempory png file - otherwise you will get two or three lots of jpg compression on the image.
Then load up the tempory png file and crop it saving as your final version and use unlink() to remove the tempory image."[/COLOR]
Do you know anything about this?
There should only be 1 JPEG compression (The final one) because the image goes from JPEG -> TrueColor -> Truecolor -> JPEG. I suppose you could consider that 2 because the original image is JPEG, but it’s nothing the script can avoid The code you’re now using doesnt use an intermediate file (the picture information is held in PHP’s memory allocation, and destroyed at the end of the script)
What do you suggest to do to get a better cropped thumbnail quality? I like the cropped feature, but if the thumbnails are going to be that crappy in quality, I think I prefer an unproportional thumbnail like earlier.
Do you have to upload a second picture or something? Or is there another way to go around it?