I needed to be able to convert different image formats to the .PNG format. With the help of some others, I was able to make that happen. The only issue is, I also need to be able to convert .BMP files to .PNG without the use of ImageMagick.
Here is the code I used for the conversion of other files:
<?php
$filename = "myfolder/test.jpg";
$jpg = @imagecreatefromjpeg($filename);
if ($jpg)
{
header("Content-type: image/png");
imagepng($jpg);
imagedestroy($jpg);
exit;
}
?>
If anyone knows how I would go about converting this, please let me know. All help is welcome and appreciated.