4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: BevS97 on November 02, 2002, 10:47:11 AM

Title: Very Poor Thumbnail quality
Post 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)
Title: Very Poor Thumbnail quality
Post by: V@no on November 02, 2002, 04:08:56 PM
GD is not very good for resizing images anyway. maybe u should think about installing ImageMagic, if u can.
Title: Very Poor Thumbnail quality
Post by: BevS97 on November 02, 2002, 04:15:35 PM
is it free? and where would I find it?
Title: Very Poor Thumbnail quality
Post by: BevS97 on November 02, 2002, 04:22:17 PM
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
Title: Very Poor Thumbnail quality
Post by: V@no on November 03, 2002, 01:53:48 AM
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)
Title: Very Poor Thumbnail quality
Post by: BevS97 on November 03, 2002, 09:12:07 AM
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
Title: Very Poor Thumbnail quality
Post by: V@no on November 04, 2002, 12:43:34 AM
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.
Title: poor thumbnail quality
Post by: bxmas13 on November 09, 2002, 12:20:28 AM
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:
Title: Very Poor Thumbnail quality
Post by: legolasbloom on November 18, 2002, 09:58:02 PM
thanks so much! it worked for me!
Title: not for me...cry...
Post by: heiko on November 18, 2002, 11:19:14 PM
Quote from: legolasbloom
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
Title: Very Poor Thumbnail quality
Post by: V@no on November 19, 2002, 03:25:09 AM
bxmas13, it seems that php server doesnt correctly define what version GD is installed.
heiko, do u have same problem with GD 1?
Title: Image resize/resample
Post by: jengwen on January 10, 2003, 09:46:19 PM
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!
Title: Re: Very Poor Thumbnail quality
Post by: undrline on August 21, 2006, 09:54:51 PM
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.
Title: Re: Very Poor Thumbnail quality
Post by: V@no on August 22, 2006, 06:57:18 AM
This is such old topic...since then a solution of this issue was added in the FAQ...