<?php function png2jpg($originalFile, $outputFile, $quality) { $image = imagecreatefrompng($originalFile); imagejpeg($image, $outputFile, $quality); imagedestroy($image); } png2jpg("img/test.png", "img/".time().".jpg", 100); if ($handle = opendir('img/')) { $i=0; while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { echo "<img src='img/$entry' width=150 height=100> "; if($i%10==0 && $i!=0){ echo "<br>"; } $i++; } } closedir($handle); } ?>
Html, JAVA,DOTNET,Javascript, PHP, and JQuery Scripts and its issues with solutions
Friday, 18 May 2018
PNG to Jpeg in PHP using GD library
Subscribe to:
Post Comments (Atom)
Feet/Inches to Meters Converter & Lbs to Kgs Converter
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Feet/Inches ⇄...
-
<?php $to = "somebody@example.com, somebodyelse@example.com"; $subject = "HTML email"; $message = " <h...
-
ISAIMINI.COM Download
-
document.onkeydown = myKeyDownHandler; function myKeyDownHandler(event){ alert(event.keyCode) }
No comments:
Post a Comment