Oberto / php-image-magician

Image manipulation at it's finest.
http://phpimagemagician.jarrodoberto.com
91 stars 54 forks source link

Resizing and displaying at same time #3

Closed rogerobando closed 11 years ago

rogerobando commented 11 years ago

I recently downloaded and am really liking this lib. I did have one question I was hoping you could answer. Right now I can resize and save an image but I'm trying to use this as a dynamic image generator. I was wondering if I could do the resizing and then display all in one fell swoop. I tried the following...

$mo = new imageLib('file.png'); $mo->resizeImage(width, height, 'crop'); $mo->saveImage('newfile.png'); $mo->displayImage('png');

The resize and save seem to be working but the display is not working. Once I make a subsequent request I can see that the new file has been written and can serve that up but I am having trouble displaying it upon initial runthrough. I'd really appreciate any help. Thanks!

Oberto commented 11 years ago

It should work. Displaying an image directly to your browser can be a bit tricky due to outputting content before the headers....