function png2jpg($originalFile, $outputFile, $quality) { $image = imagecreatefrompng($originalFile); imagejpeg($image, $outputFile.'.jpg', $quality); imagedestroy($image); }
I use this to compress images, but I continue to search for my file, which I delete. Does imagedestroy () force this to save memory or it will also delete the output file.
source share