Paint on a jpg image file : JPG Image : Graphics Image PHP Source Code


PHP Source Code » Graphics Image » JPG Image »

 

Paint on a jpg image file




<?php
$mainImage = imagecreatefromjpeg('jpgFile.jpg');   
$mainWidth = imagesx($mainImage);
$mainHeight = imagesy($mainImage);
$thumbWidth = intval($mainWidth / 4);
$thumbHeight = intval($mainHeight / 4);
$myThumbnail = imagecreatetruecolor($thumbWidth, $thumbHeight);
imagecopyresampled($myThumbnail, $mainImage, 0000, $thumbWidth, $thumbHeight, $mainWidth, $mainHeight);
header("Content-type: image/jpeg");
imagejpeg($myThumbnail);
imagedestroy($myThumbnail);
imagedestroy($mainImage);

?>
           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Graphics Image
» JPG Image