note 106484 added to function.imagepng
| From: | JawadSiddiqui at osu1 dot php dot net | Date: | Sun, 13 Nov 2011 13:23:54 +0000 |
| Subject: | note 106484 added to function.imagepng | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184415@lists.php.net to get a copy of this message | ||
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']));
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 182.178.229.104
----
Manual Page -- http://www.php.net/manual/en/function.imagepng.php
Edit -- https://master.php.net/note/edit/106484
Del: integrated -- https://master.php.net/note/delete/106484/integrated
Del: useless -- https://master.php.net/note/delete/106484/useless
Del: bad code -- https://master.php.net/note/delete/106484/bad+code
Del: spam -- https://master.php.net/note/delete/106484/spam
Del: non-english -- https://master.php.net/note/delete/106484/non-english
Del: in docs -- https://master.php.net/note/delete/106484/in+docs
Del: other reasons-- https://master.php.net/note/delete/106484
Reject -- https://master.php.net/note/reject/106484
Search -- https://master.php.net/manage/user-notes.php