note 106484 deleted from function.imagepng by tularis

From: Date: Mon, 14 Nov 2011 14:34:38 +0000
Subject: note 106484 deleted from function.imagepng by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-184431@lists.php.net to get a copy of this message
Note Submitter: Jawad Siddiqui Reason: useless ---- this dpi image convert work for jpeg images only <?php function Change_dpi_200($path) { //Read the jpeg image $image = file_get_contents($path); //echo $image; $image = substr_replace($image, pack("nn", 200, 200), 14, 4); header("Content-type: image/jpeg; charset=utf-8"); //header("Content-type: image/png"); //header("Content-type: image/bmp"); header('Content-Disposition: attachment; filename="200dpi_'.basename($path).'"'); echo $image; } if ($_POST['submit']=='submit'){ $target_path = basename( $_FILES['file1']['name']); move_uploaded_file($_FILES['file1']['tmp_name'], $target_path); Change_dpi_200($target_path); //print_r(get_dpi($_POST['file1'])); ///print_r(get_dpi($_POST['file1'])); } ?>

« previous php.notes (#184431) next »