Uploading a png photo to mysql and maintaining transparency

Avatar
  • Answered
James sent me to some excellent code to upload photos. However, I also want to maintain the transparency of my png images upon upload.
Is this possible with Inmotion? If so, how would I do it.
Avatar
jamesr
Thank you for your question Mam1606!

MySQL will store you image as a BLOB (Binary Large Object). When you upload the image to your database, the file format is retained in the Binary data. When the image is called using PHP, the image should load with the exact same file format, retaining the transparency. This should work on any LAMP (Linux, Apache, MySQL, PHP) server. All InMotion servers are LAMP servers so you should be ok to use .png's with transparencies in your BLOB data of your database at InMotion.

Best Regards,
James R