4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: BevS97 on November 02, 2002, 10:47:11 AM
-
I have my gallery set up to auto generate the thumbnails using GD Bibliothek, and I have Compression off, and quality = 100.
the first few images had nice looking thumbnails, but the latest one's are very poor quality. I haven't changed anything regarding the thumbnails in the setup.
here's a good one
(http://www.ukscrappers.co.uk/gallery/data/thumbnails/1/jade_august_2002.jpg)
and a recent one
(http://www.ukscrappers.co.uk/gallery/data/thumbnails/1/signing_register.JPG)
-
GD is not very good for resizing images anyway. maybe u should think about installing ImageMagic, if u can.
-
is it free? and where would I find it?
-
to answer my own question, it is free and it's here
http://www.imagemagick.org/
but it's not clear what I need to download, and where I would install it.
Bev
-
well, try this:
ftp://ftp.fifi.org/pub/ImageMagick/binaries/
then if u use windows, then u'll need put exact path/with file convert.exe were u install IM in 4images settings:
ex. D:/ImageMagick/convert.exe
if linux, then /home/ImageMagic/covert (not sure about linux, never used)
-
so, are you saying I just install it on my pc??? Surely I need to put it up on my website someplace? How would my other members use it, if it is only installed on my pc.
Bev
-
well, non of your users uses PHP when they open your website, your server does everything and output for them the result.
same with ImageMagic. u just tell 4images script where its installed.
then when time comes to change size of your photos, or make thumbnails, the script will run ImageMagick. that's all.
-
Just found a way to keep the thumbnail quality high using GD_Bibliothek/GD_Library.
If you edit the /includes/image_utils.php with the following:
Scroll down to the lines
if (defined('CONVERT_IS_GD2') && CONVERT_IS_GD2 == 1) {
$thumb = imagecreatetruecolor($width, $height);
}
else {
$thumb = imagecreate($width, $height);
}
$image_create_handle = "imagecreatefrom".$types[$image_info[2]];
Change it to this:
if (defined('CONVERT_IS_GD2') && CONVERT_IS_GD2 == 1) {
$thumb = imagecreatetruecolor($width, $height);
}
else {
$thumb = imagecreatetruecolor($width, $height);
}
$image_create_handle = "imagecreatefrom".$types[$image_info[2]];
Every thumbnail I create with this change has turned out perfect. I hope this helps.
B.C. :idea:
-
thanks so much! it worked for me!
-
thanks so much! it worked for me!
:cry:
Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in
I got this....crumbel crumbel...provider...provider...:-(
Heiko
-
bxmas13, it seems that php server doesnt correctly define what version GD is installed.
heiko, do u have same problem with GD 1?
-
The change above fixed my colors, but the thumbnail still looked pretty bad. There is another if statement shortly after the truecolor one for imageresize or imageresample. I changed that one too and now my thumbnails look great!
-
That's some bad code you're asking it to do . . . you're telling an if-statement to do the same thing regardless of whether the criteria are true.
If it works, I guess, there's no harm, but I wouldn't encourage others to try it.
-
This is such old topic...since then a solution of this issue was added in the FAQ...