Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

error reading jpeg image



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

10+ Year Member

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)

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

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)

10+ Year Member

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)

10+ Year Member

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)

10+ Year Member

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)

WebmasterWorld Senior Member 10+ Year Member

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.


Featured Threads

Hot Threads This Week

Hot Threads This Month