View Full Version : i'm having problems with the thumbnails that GD is generating
lucas
11-01-2002, 03:29 PM
i have a php script that automatically generates thumbnails of larger pictures using GD.
it worked fine up until today, when it started producing thumbnails like this: http://www.extremesanity.com/messedup.jpg
the script hasn't changed, and the pictures haven't changed (i re-generated old pictures just to make sure it wasn't an anomaly). all i can think of is something changed when Steve upgraded php.
anyone know how to fix this?
Steven
11-01-2002, 03:36 PM
hey lucas,
I will have this researched, can anyone else confirm that this is happening on their account(s)? Php was upgraded on October 17, so I don't think that that is the problem if this just started yesterday.
-Steven
lucas
11-01-2002, 06:46 PM
let me clarify. the last time i generated thumbnails successfully was before the upgrade. i just now found the problem.
pete3005
11-02-2002, 01:11 PM
I am using it on a site for the same purpose, I haven't experienced that problem myself.
Steven, if for any reason you go back to GD 1.x, can you tell me before, as the script I have will only work with GD 2 and will require some changes if you downgrade for any reason.
Thanks
Pete
lucas
11-02-2002, 11:36 PM
well i switched to using ImageMagick. funny, it didn't work last time i tried to use it.
so i guess it works well enough. i would like to know what has changed in the upgrade that broke my script though.
Steven
11-02-2002, 11:41 PM
See the only odd thing here is that both of you are on the same server, and it works for one person but not for the other. Lucas, what script are you using to generate these thumbnails? Pete, don't worry we will let you know if we downgrade GD.
-Steven
lucas
11-03-2002, 01:39 AM
well we are using two different scripts ya know. his is probably optimized for the new and old versions of GD.
i'm pretty sure i know why GD isn't working as well; GD was upgraded with all the rest of the stuff which broke the script.
really i'm just curious if anyone knows what changed from the older version of GD to the newer version that started to make my thumbnails look like crud.
anyways here it is: http://www.extremesanity.com/PHPix202.zip
its a nifty barebones script that generates thumbnails on the fly using ImageMagick or GD.
like i mentioned before, its not a big deal because i got it working with ImageMagick fairly well, i'm now just curious what changed.
lucas
11-03-2002, 02:00 AM
i found the problem
after searching around for the 5th time this week i finally found it.
ImageCreateTrueColor() should be used instead of imageCreate()
nice and simple huh? imageCreate worked fine in earler versions of gd but in the new version it will only generated 256 colors making jpegs look nasty.
http://www.php.net/manual/en/function.imagecreatetruecolor.php
lucas
11-03-2002, 02:00 AM
oh, btw, i updated the zip file of the script with the changes if anyone else wants to use it.
Steven
11-03-2002, 02:43 PM
Lucas,
Great job finding the problem and the solution. You are a quick learner and an overpaid slacker. Anyways isn't that an ostrich in your avatar or is it an emu?
-Steven
lucas
11-04-2002, 12:23 AM
i *think* its an emu. all the pictures i've seen of ostriches show them with light skin heads, and the emus usually have black heads.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.