GIF 仅在 IE 中可见,但在 Firefox、Photoshop 或任何其他应用程序中不可见
请使用 Firefox 或任何其他浏览器以及 Internet Explorer 访问以下页面: http://uni-ka.the-jens.de/html/mathe4 /mase2.htm
您将看到图片(公式)在 IE 中可见。这是怎么做到的? 此外,您会发现它与 html 源代码无关,只与图片有关:
下载这些图片中的任何一个并尝试查看它们。有些应用程序显示白色图片,有些应用程序显示黑色图片,有些应用程序显示透明图案的图片。
假设您从上面的给定页面下载了第一张图片 (
ma63x.gif
),制作一个副本并使用十六进制或文本编辑器打开它,并添加其中一些符号ÿþýû÷ïß¿
从第 8 行第 374 行或位置 1218(十进制)开始。保存后,一些应用程序现在会告诉您 gif 文件没有有效的格式。假设您将操作后的副本存储为
<块引用>my.g
,然后将它们作为 htm/html 文件保存到行中,并在 Firefox 中打开,然后再次在 IE 中打开。img src="ma63x.gif"
img src="my.g"
Firefox 仍然不会显示图片(我使用的是 3.6 版本,也许 4.0 可以渲染 gif)。 IE 现在将向您显示原件和副本。比较两者并尝试在副本中添加和删除标志。
现在我的问题是:
- 是否有任何应用程序使用此“功能”,因为我什至在 Photoshop 中看不到有用的东西(在索引颜色模式下只有一个黑色层)?
- 为什么只有IE才能正确显示图片?
- 您知道如何以完整的方式手动操作上面提到的 gif 吗?
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 this 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我检查了页面上的第一张图片,发现我的理论是正确的。我找到了这些设置:
因此,图像被放置在视口之外。
Chrome 扩展视口以包含图像,而 IE 和 Opera 则忽略视口并仅显示图像(或忽略图像的位置)。 Firefox 执行格式指定的操作,即仅显示视口和其中可见的图像部分。
根据评论,该图像是使用 AFPL Ghostscript 创建的,它是一个 Postscript 解释器,因此它可能是从 Postscript 转换为 GIF。
我编辑了文件以将图像位置更改为 0,0,然后它就可以正常工作:
I examined the first image on the page, and found that my theories were correct. I found these settings:
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:
你的 GIF 有问题。
这就是图像在 Chrome 中的样子,没有大小限制(大量空间是图像的一部分)
图像数据始终存在,但 Chrome 读取图像为大图像(标签中的大小限制迫使其调整整个图像的大小),而 IE 读取图像为小图像。
我认为生成 GIF 文件的应用程序必须在标头数据中存储奇数值。
对我来说解决这些问题的方法是打开 IrfanView 中的图像,然后将它们再次保存为 GIF 文件。
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.