One would think that pulling binary data from a DB using the function imageCreateFromString would allow you to output that string to any format. (GIF JPEG PNG) or whatever is supported by your version of GD.
But this code flakes out and creates no image if it reads from a binary file made by a GIF file. (works great for JPEGs!!) Anyone see what the problem might be? Or know of any way to output a JPEG or PNG from a binary GIF file in a mySQL DB? Theory code only... 1. Query binary string from DB 2. Create Image From String 3. Scale your image to fit the size you need. 4. Use ImageCreateTrueColor to create your compatible background square 5. Fill it with your background color using ImageFilledRectangle 6. Use ImageCopyResampled to place your Image from String onto you background image 7. use imageJpeg to output your true color image as a JPEG Since this works great as JPEG IN, JPEG OUT, but does NOT work when GIF is the source, is this because ImageCopyResampled can't use the GIF image? If so, anyone have a nice code snippet that will turn client uploads from GIFs into JPEGS? - Thanks in advance folks, I realize this is a tough one, and any suggestions are always greatly appreciated, and as always I will post my final solution for the archives. Thanks again. -NorthBayShane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php