My problem is rather straight-forward:
- Retrieve an image from a MySQL database (currently stored as binary data in a blob column)
- Rotate that image 90 degrees (using PHP’s imagerotate)
- Store the image back in the database with that rotation changes applied.
I’m having trouble finding functions that will let me save the image as a datastream (not to the file system) since these images are not allowed to touch the web server (hence, why they are in the db). Any advice is welcome.
Thanks
Are you converting the image to another type before rotating? You said you’re using tiffs, GD can only read the headers of tiff images, you’ll need to convert it first. Probably with ImageMagick
Most likely you will want to save the files to a temp directory: