|
#1
|
|||
|
|||
|
Quality of thumbnails.
First of all thankyou for a great script. I have been looking for something like this for a long time.
I would like the thumbnails to be better quality, they are compressed too much. I have looked in the code for a parameter on the matter but couldn't find one. Can this be fixed and how? Regards, Kenneth |
|
#2
|
||||
|
||||
|
Open up admin/index.php and look for
imagejpeg($img, "../thumbnails/thumb_$file"); It's very close to the end of the entire script. Edit that so it reads imagejpeg($img, "../thumbnails/thumb_$file",100); The 100 is an optional thing telling gd to use as little compression as possible. // punK
__________________
icq: 66760929 |
|
#3
|
|||
|
|||
|
Great that was it! Thx for the quick response. Now the thumbnails are nice and clean but not very sharp. I've checked the latest gd documentation (2.0.28) and I see that gd has a sharpening function (gdImageSharpen) is it possible to add that fuction to the thumbnails so they could be sharpened?
http://www.boutell.com/gd/manual2.0.28.html (search for 'void gdImageSharpen') /Kenneth |
|
#4
|
||||
|
||||
|
Try to add it and see what happens.
$img = gdImageSharpen($img); Just above the line you edited for compression. Test it, tell me if it works! ![]() // punK
__________________
icq: 66760929 |
|
#5
|
|||
|
|||
|
Well, I have no idea how and where to add it but I gave it a try and got this error:
Quote:
when I try to resize thumbnails. /Kenneth |
|
#6
|
||||
|
||||
|
My guess would be that your gd-version don't support that function (gdImageSharpen).
That is what the error says. // punK
__________________
icq: 66760929 |
|
#7
|
|||
|
|||
|
I've checked and my host runs gd 2.0.28 and gdImageSharpen was added in ver. 2.0.16 so I don't think that's the problem.
/Kenneth |
|
#8
|
||||
|
||||
|
Oh darn. It's not yet implemented in PHP unfortunately, that was the problem.
// punK
__________________
icq: 66760929 |
|
#9
|
|||
|
|||
|
Ah ok. It would be cool if it worked.
/Kenneth |
| Post Reply |
| Thread Tools | |
|
|