Image

Listens: Alkaline Trio

Hi,
I'm trying [for the first time] to use the GD Library with PHP.

What I want to do is simply resize a given image. There lies a problem, however. The image that I want to resize is held within a BLOB in my database. Using this function, imagecreatefromjpeg(), Which it's params are a string. I don't have a string, only a variable holding the file contents - I dont have a string for the link to where it is located. Also, the contents stored in a BLOB is well- going to be binary, hence the name. And when I say, copy this image from jpeg.. this should give me a problem. At least, I assume. I'm not familar with compression of images.

I don't really know where to go from here any more. But, I may have an idea. What I plan to do is this.. Using the variable that holds the binary image contents create a temp image file on the server(and convert it to jpeg.. which i dont know how to do) and once its in a tmp folder.. i just use the function imagecreatefromjpeg(" string [ to place on server ] ) . Hows that sound? or and I just missing something stupid here.

Thanks,
John