Welcome to WebmasterWorld Guest from 107.21.149.142

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

error reading jpeg image

     
6:24 pm on Aug 20, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 15, 2002
posts:450
votes: 0


When i use fopen or readfile or anything to display a jpeg at a certain URL location, it displays fine in the browser but you can ONLY save it as a bitmap, even though it is a jpeg. If I get the file normally from the address bar or a link, I can save it as a jpeg. What is the problem??
11:49 pm on Aug 20, 2002 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15755
votes: 0


That sounds strange scorpion. I haven't run into that before.

Why do you want to be able to save the image? Do you mean when you right click on it and try to save it?

11:54 pm on Aug 20, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 17, 2002
posts:601
votes: 0


I am just guessin here but could it be a headers issue? If its set to 'image/bmp', would this only allow it to save as a bmp?
10:18 am on Aug 22, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


When I saw the question first off I thought this might be a case for using the binmode function, but having read the question more it looks more like something I dont have a clue about, so I'll leave it for the other guys.
1:07 pm on Aug 22, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 15, 2002
posts:450
votes: 0


I am using image/jpeg as the header. Yes, if I right click save as it only allows bitmap, even though the image loaded is jpg. If I output html and use img src, you can save it as a jpg. But everyway I've tried programmatically (@readfile, fopen, etc..) it doesn't save as jpeg...
1:23 pm on Aug 22, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 10, 2001
posts:748
votes: 0


Does this happen only in MSIE? or all browsers?

MSIE likes to ignore the mime type a lot and look at the extension of the file.