GIF ONLY visible in IE BUT not in Firefox, Photoshop or any other app
Please visit the following page with Firefox or any other browser AND Internet Explorer: http://uni-ka.the-jens.de/html/mathe4/mase2.htm
You'll see the pictures (formulas) are just visible in IE. How is th开发者_Go百科is done? Furthermore you'll see it has nothing to do with html source, only with the picture:
Download any of these pictures and try to view them. Some apps show a white picture, some a black picture and others a transparency-patterned picture.
Assuming you downloaded the first picture from the given page above (
ma63x.gif
) make a copy and open it with hex or text editor and add some of these signsÿþýû÷ïß¿
starting in line 8 col 374 or at position 1218 (decimal). After saving, some apps will tell you now that the gif file has no valid format.Let's say you stored the manipulated copy as
my.g
then save those to lines as a htm/html file and open it in Firefox and again in IE.img src="ma63x.gif"
img src="my.g"
Firefox will still not show the picture (I use version 3.6, maybe 4.0 is able to render the gif). IE will now show you the original and your copy. Compare both and play a little with adding and removing signs in your copy.
Now my questions:
- Is there any app that uses this "feature" because I could not even see something useful in Photoshop (just one black layer in index color mode)?
- Why can only IE show the picture correctly?
- Do you know how to manually manipulate the gif as mentioned above in a sense full way?
I examined the first image on the page, and found that my theories were correct. I found these settings:
Viewport width = 363
Viewport height = 28
Image position = 190, 448
Image width = 363
Image height = 28
Comment: Image generated by AFPL Ghostscript (device=pnmraw)
So, the image is placed outside the viewport.
Chrome expands the viewport to include the image, while IE and Opera ignores the viewport and only shows the image (or ignores the placement of the image). Firefox does what the format specifies, i.e. only shows the viewport and the parts of the image that is visible inside it.
According the comment the image was created using AFPL Ghostscript, which is a Postscript interpreter, so it was probably converted from Postscript to GIF.
I edited the file to change the Image position to 0,0, and then it works just fine:
There's something wrong with your GIFs.
This is what the image looks like in Chrome without the size constraint (the vast amounts of space are a part of the image)
so the image data is always there, but Chrome reads the image as large (with the size constraints in the tags forcing it to resize the whole thing), and IE reading it as small.
I think the application that generated the GIF files must be storing odd values in the header data.
What works for me to fix them is opening the images in IrfanView, and saving them again as GIF files.
精彩评论