What is the difference between "image/png" and "image/x-png"?
“image/png”和“image/x-png”有什么区别?
4 个解决方案
#1
56
The x-
prefix is given to non-standard MIME types (i. e. not registered with IANA). So I assume that image/x-png
would have been PNG before the MIME type was standardized.
对非标准MIME类型(即,e)给出了x前缀。不是在IANA注册)。因此,我假设图像/x-png在MIME类型标准化之前是PNG格式的。
6.3. New Content-Transfer-Encodings
6.3。新Content-Transfer-Encodings
Implementors may, if necessary, define private Content-Transfer-Encoding values, but must use an x-token, which is a name prefixed by “
X-
”, to indicate its non-standard status, e. g., “Content-Transfer-Encoding: x-my-new-encoding
”. Additional standardized Content-Transfer-Encoding values must be specified by a standards-track RFC. The requirements such specifications must meet are given in RFC 2048. As such, all content-transfer-encoding namespace except that beginning with “X-
” is explicitly reserved to the IETF for future use.如果有必要,实现者可以定义私有的内容转换编码值,但是必须使用X- token,这是一个前缀为“X-”的名称,以表示其非标准状态。“Content-Transfer-Encoding:x-my-new-encoding”。额外的标准化内容转换编码值必须由标准跟踪RFC指定。在RFC 2048中必须满足这些规范的要求。因此,除了以“X-”开头的所有内容转移编码名称空间都显式地保留给IETF以供将来使用。
—RFC 2045 — Multipurpose Internet Mail Extensions, Section 6.3
- rfc 2045 -多用途因特网邮件扩展,第6.3节。
This is also documented in the PNG specification. See FalseVinylShrub's answer.
这在PNG规范中也有记录。看到FalseVinylShrub的答案。
#2
23
According to http://www.w3.org/TR/PNG/#A-Media-type
根据http://www.w3.org/TR/PNG/的一种多媒体类型
The internet media type "image/png" is the Internet Media Type for PNG [RFC-2045], [RFC-2048]. It is recommended that implementations also recognize the media type "image/x-png".
互联网媒体类型“image/png”是png [RFC-2045]的网络媒体类型[RFC-2048]。建议实现还可以识别媒体类型“图像/x-png”。
So, if you're delivering or uploading a PNG image, 'image/png' is the correct one to use. However, if you're accepting uploads or otherwise interpreting the media type, you are recommended to accept either.
因此,如果你正在传送或上传一个PNG图像,“image/ PNG”是正确使用的。但是,如果您接受上传或其他解释媒体类型,也建议您接受。
By the way, I found a reference from 2008 that Internet Explorer (version unspecified) was uploading PNG images with a type of image/x-png, so this was a real issue for someone as recently as that.
顺便说一下,我在2008年找到了一个参考资料,那就是ie浏览器(未指定的版本)正在用一种图像/x-png上传PNG图像,所以这对最近的人来说是一个真正的问题。
#3
6
According to Wikipedia's article on Internet Media Types, and the article it cites...
根据*上关于网络媒体类型的文章,以及它引用的文章……
Types or subtypes that begin with x- are nonstandard
以x开头的类型或子类型是非标准的。
So my guess is "image/x-png" is probably leftover from the days when png was pretty new, and as such, not standardized.
所以我的猜测是“图像/x-png”很可能是png新出现的时候遗留下来的,而不是标准化的。
#4
4
image/x-png was the type before PNG was accepted by the IANA as an official mime type.
图像/x-png是在PNG被IANA接受为官方mime类型之前的类型。
http://www.iana.org/assignments/media-types/image/
http://www.iana.org/assignments/media-types/image/
The official image/png MIME type for PNG, approved on 14 October 1996
png的官方图像/png MIME类型,于1996年10月14日通过。
http://www.w3.org/Graphics/PNG/
http://www.w3.org/Graphics/PNG/
#1
56
The x-
prefix is given to non-standard MIME types (i. e. not registered with IANA). So I assume that image/x-png
would have been PNG before the MIME type was standardized.
对非标准MIME类型(即,e)给出了x前缀。不是在IANA注册)。因此,我假设图像/x-png在MIME类型标准化之前是PNG格式的。
6.3. New Content-Transfer-Encodings
6.3。新Content-Transfer-Encodings
Implementors may, if necessary, define private Content-Transfer-Encoding values, but must use an x-token, which is a name prefixed by “
X-
”, to indicate its non-standard status, e. g., “Content-Transfer-Encoding: x-my-new-encoding
”. Additional standardized Content-Transfer-Encoding values must be specified by a standards-track RFC. The requirements such specifications must meet are given in RFC 2048. As such, all content-transfer-encoding namespace except that beginning with “X-
” is explicitly reserved to the IETF for future use.如果有必要,实现者可以定义私有的内容转换编码值,但是必须使用X- token,这是一个前缀为“X-”的名称,以表示其非标准状态。“Content-Transfer-Encoding:x-my-new-encoding”。额外的标准化内容转换编码值必须由标准跟踪RFC指定。在RFC 2048中必须满足这些规范的要求。因此,除了以“X-”开头的所有内容转移编码名称空间都显式地保留给IETF以供将来使用。
—RFC 2045 — Multipurpose Internet Mail Extensions, Section 6.3
- rfc 2045 -多用途因特网邮件扩展,第6.3节。
This is also documented in the PNG specification. See FalseVinylShrub's answer.
这在PNG规范中也有记录。看到FalseVinylShrub的答案。
#2
23
According to http://www.w3.org/TR/PNG/#A-Media-type
根据http://www.w3.org/TR/PNG/的一种多媒体类型
The internet media type "image/png" is the Internet Media Type for PNG [RFC-2045], [RFC-2048]. It is recommended that implementations also recognize the media type "image/x-png".
互联网媒体类型“image/png”是png [RFC-2045]的网络媒体类型[RFC-2048]。建议实现还可以识别媒体类型“图像/x-png”。
So, if you're delivering or uploading a PNG image, 'image/png' is the correct one to use. However, if you're accepting uploads or otherwise interpreting the media type, you are recommended to accept either.
因此,如果你正在传送或上传一个PNG图像,“image/ PNG”是正确使用的。但是,如果您接受上传或其他解释媒体类型,也建议您接受。
By the way, I found a reference from 2008 that Internet Explorer (version unspecified) was uploading PNG images with a type of image/x-png, so this was a real issue for someone as recently as that.
顺便说一下,我在2008年找到了一个参考资料,那就是ie浏览器(未指定的版本)正在用一种图像/x-png上传PNG图像,所以这对最近的人来说是一个真正的问题。
#3
6
According to Wikipedia's article on Internet Media Types, and the article it cites...
根据*上关于网络媒体类型的文章,以及它引用的文章……
Types or subtypes that begin with x- are nonstandard
以x开头的类型或子类型是非标准的。
So my guess is "image/x-png" is probably leftover from the days when png was pretty new, and as such, not standardized.
所以我的猜测是“图像/x-png”很可能是png新出现的时候遗留下来的,而不是标准化的。
#4
4
image/x-png was the type before PNG was accepted by the IANA as an official mime type.
图像/x-png是在PNG被IANA接受为官方mime类型之前的类型。
http://www.iana.org/assignments/media-types/image/
http://www.iana.org/assignments/media-types/image/
The official image/png MIME type for PNG, approved on 14 October 1996
png的官方图像/png MIME类型,于1996年10月14日通过。
http://www.w3.org/Graphics/PNG/
http://www.w3.org/Graphics/PNG/