Show image img src=img.php?img=1.jpg help
Hi!
Really need help, dont know whats wrong :(
I am trying to show images using php script, it works fine, pictures
are shown,
but if i right click on it and choose "save picture as" it offers me to
save it as "untitled.bmp",
not jpeg the picture actually is :(
And if i do save it and then check it - it is actually bmp image, not
jpeg (it has bmp header)
Could you help please, i need to be able to save it as jpeg, using
"save picture as".
here is the script:
<?php
if ($_REQUEST['img'])
{
$showfile = $_REQUEST['img'];
if (file_exists($showfile))
{
header("content-type: image/jpeg");
header('Content-Length: ' . filesize($showfile));
$mfile = fopen($showfile, 'rb');
fpassthru($mfile);
fclose($mfile);
}
}
echo "<img src='?img=1.jpg'>";
?>
Thanks a lot!
.
Relevant Pages
- Re: How does JPEG work?
... extract embedded images from the text as JPEGs. ... JPEG is an acronym for "Joint Photographic Experts Group", ... command can insert a picture from a .jpg formatted file among many others. ... Saving a picture in the .jpg format is done by other programs, ... (microsoft.public.word.docmanagement) - Re: Problem displaying web pages
... Compress graphics file sizes to create smaller Publisher Web ... You add it to the picture toolbar after installing the SP. ... rendering two different versions of both your company logo and the ... viewing this site in publisher the images are good quality. ... (microsoft.public.publisher.webdesign) - Re: How can I hyperlink to an enlarged picture in Publisher 2003?
... I was referencing the way you produce your html ... One of the places where Publisher starts to feel its limits is when the ... When you resize and optimize your images, ... Picture> Size tab). ... (microsoft.public.publisher.webdesign) - Re: PHP images and time
... I want to add a php script to my page that changes my collection of ... images based on the time of my computer. ... change the picture on the site, but it should not be random. ... img tag on your page. ... (php.general) - Re: How do I create mouse overs for web documents?
... I did tweak the sky and the picture is a LITTLE bit clearer. ... Many thanks David. ... > you can see that you have added the alt tags to your images as they load ... and to get the alt tags to work in Pub 2003 requires ... (microsoft.public.publisher.webdesign) |
|