Hey guys can someone help me in how to print directly the image to the browser. Here is my code $sourcePath = "C:/Server/Apache/htdocs/project/".$file_source; $thumbWidth = $target_size; $sourceImage = imagecreatefromjpeg($sourcePath); $sourceWidth = imagesx($sourceImage); $sourceHeight = imagesy($sourceImage); $targetImage = imagecreate($thumbWidth,$thumbWidth); imagecopyresized($targetImage,$sourceImage,0,0,0,0,$thumbWidth, $thumbWidth,imagesx($sourceImage),imagesy($sourceImage)); ($targetImage,'',90); imageJPEG($targetImage,'',90); // As though output to browser. I run this code and its display a raw of data in my screen without image.... ©#Ã¥2¤‚}k¡øñª-TÔ,®Ã´»¾a*O#ºlSò’±‘¸äòqÓè*ÖpN{œî¬dùv>¨Õ â]ØGlê–òÎVÃ¥Y2YnÀ)ìwçÓ$j>ñºÖõ_VÂ쥡´i¥Úҳ‚ïê1‘Ó W©i?4½vÉ.ÒóN²ÜH0_]¬R) ÿLŠêtÂ¥1Fª{Ÿ6M Can someone help me of how to fix this problem.....I just want to display the image to the browser.
lol Chemo..I already try to send using header but still not work...maybe i am doing in a wrong way... header("Content-type: image/jpeg"); imageJPEG($targetImage,'',90); is that the right format?