From 13f263cc2afa54ee3e84a4e2a402db932a7716a6 Mon Sep 17 00:00:00 2001 From: Jason Ren <40999116+jasonren0403@users.noreply.github.com> Date: Wed, 1 Nov 2023 14:01:17 +0800 Subject: [PATCH] APNG and table --- .../web/media/formats/image_types/index.md | 296 +++++++++--------- 1 file changed, 140 insertions(+), 156 deletions(-) diff --git a/files/zh-cn/web/media/formats/image_types/index.md b/files/zh-cn/web/media/formats/image_types/index.md index 772c4596c29887..8c0e334575444c 100644 --- a/files/zh-cn/web/media/formats/image_types/index.md +++ b/files/zh-cn/web/media/formats/image_types/index.md @@ -158,9 +158,9 @@ slug: Web/Media/Formats/Image_types ### APNG(动态可移植网络图形) -APNG is a file format first introduced by Mozilla which extends the [PNG](#png_portable_network_graphics) standard to add support for animated images. Conceptually similar to the animated GIF format which has been in use for decades, APNG is more capable in that it supports a variety of [color depths](https://zh.wikipedia.org/wiki/color_depth), whereas animated GIF supports only 8-bit [indexed color](https://zh.wikipedia.org/wiki/indexed_color). +APNG 是 Mozilla 首次推出的一种文件格式,它扩展了 [PNG](#png_便携式网络图形) 标准,增加了对动画图像的支持。在概念上,APNG 与已经使用了几十年的动画 GIF 格式相似,但 APNG 的功能更强,它支持多种[颜色深度](https://zh.wikipedia.org/wiki/色彩深度),而动画 GIF 只支持 8 位[索引颜色](https://zh.wikipedia.org/wiki/索引顏色)。 -APNG is ideal for basic animations that do not need to synchronize to other activities or to a sound track, such as progress indicators, activity [throbbers](https://zh.wikipedia.org/wiki/throbber), and other animated sequences. For example, APNG is [one of the formats supported when creating animated stickers](https://developer.apple.com/stickers/) for Apple's iMessage application (and the Messages application on iOS). They're also commonly used for the animated portions of web browsers' user interfaces. +APNG 适用于无需与其他活动或音轨同步的基本动画,如进度指示器、活动[加载器](https://en.wikipedia.org/wiki/throbber)和其他动画序列。例如,APNG 是苹果 iMessage 应用程序(和 iOS 上的“信息”应用程序)[创建动画贴纸时支持的格式之一](https://developer.apple.com/stickers/)。它们也常用于 web 浏览器用户界面的动画部分。 @@ -182,7 +182,7 @@ APNG is ideal for basic animations that do not need to synchronize to other acti - + @@ -195,57 +195,46 @@ APNG is ideal for basic animations that do not need to synchronize to other acti - + - - + + - - + + - - + + - + - + @@ -254,17 +243,12 @@ APNG is ideal for basic animations that do not need to synchronize to other acti - + @@ -301,15 +285,15 @@ As support is not yet comprehensive (and has little historical depth) you should
浏览器兼容性Chrome 59, Edge 12, Firefox 3, Opera 46, Safari 8Chrome 59、Edge 12、Firefox 3、Opera 46、Safari 8
最高分辨率
颜色模式Bits per component (D)每分量比特(D 描述
Greyscale1, 2, 4, 8, and 16灰度1、2、4、8 和 16 - Each pixel consists of a single D-bit value indicating - the brightness of the greyscale pixel. + 每个像素由一个 D 位值组成,表示灰度像素的亮度。
True color8 and 16真彩色8 和 16 - Each pixel is represented by three D-bit values - indicating the level of the red, green, and blue color - components. + 每个像素由三个 D 位值表示,分别代表红、绿、蓝三色的色阶。
Indexed color1, 2, 4, and 8索引颜色1、2、4 和 8 - Each pixel is a D-bit value indicating an index into a - color palette which is contained within a - D 位值,表示调色板的索引,调色板包含在 APNG 文件的 PLTE - chunk in the APNG file; the colors in the palette all use an - 8-bit depth. + > 块中;调色板中的颜色都使用 8 位深度。
Greyscale with alpha带有透明度的灰度值 8 and 16 - Each pixel is represented by two D-bit values: the - intensity of the greyscale pixel and an alpha sample, indicating - how opaque the pixel is. + 每个像素由两个 D 位值表示:灰度像素的强度和表示像素不透明程度的 alpha 样本。
True color with alpha带有透明度的真彩色 8 and 16 - Each pixel is comprised of four D-pixel color - components: red, green, blue, and the alpha sample indicating - how opaque the pixel is. + 每个像素由四个 D 像素颜色成分组成:红色、绿色、蓝色和表示像素不透明程度的 alpha 样本。
压缩Lossless无损
授权 - Free and open under the - Creative Commons Attribution-ShareAlike license - (CC-BY-SA) - version 3.0 or later. + 根据创作共用署名-相同方式共享许可CC-BY-SA)3.0 或更高版本免费开放。
- + - + - + - + - + - + - + - + @@ -393,34 +377,34 @@ Theoretically, several compression algorithms are supported, and the image data
MIME typeMIME 类型 image/avif
File extension(s)文件扩展名 .avif
Specification规范

Browser compatibility浏览器兼容性 Chrome 85, Opera 71, Firefox 93, and Safari 16.1.
    @@ -337,11 +321,11 @@ As support is not yet comprehensive (and has little historical depth) you should
Maximum dimensions最大尺寸 2,147,483,647×2,147,483,647 pixels
Supported color modes支持的颜色模式

Color mode support information is provided in the @@ -362,11 +346,11 @@ As support is not yet comprehensive (and has little historical depth) you should

Compression压缩 Lossy and lossless.
Licensing授权 Royalty free. Licensing information is available at http://aomedia.org/license/ .
- + - + - + - + - + - +
MIME typeMIME 类型 image/bmp
File extension(s)文件扩展名 .bmp
Specification规范 No specification; however, Microsoft provides general documentation of the format at docs.microsoft.com/en-us/windows/desktop/gdi/bitmap-storage
Browser compatibility浏览器兼容性 All versions of Chrome, Edge, Firefox, Internet Explorer, Opera, and Safari
Maximum dimensions最大尺寸 Either 32,767×32,767 or 2,147,483,647×2,147,483,647 pixels, depending on the format version
Supported color modes支持的颜色模式 @@ -432,33 +416,33 @@ Theoretically, several compression algorithms are supported, and the image data - + - + - + - + - + - + - +
Greyscale灰度 1 Each bit represents a single pixel, which can be either black or white.
True color真彩色 8 and 16 Each pixel is represented by three values representing the red, green, and blue color components; each is D bits.
Indexed color索引颜色 2, 4, and 8 Each pixel is represented by a value which is one 2, 4, or 8 bits, serving as an index into the color table.
Greyscale with alpha带有灰度的真彩色 n/a BMP has no distinct grayscale format.
True color with alpha带有透明度的真彩色 8 and 16 Each pixel is represented by four values representing the red, @@ -470,13 +454,13 @@ Theoretically, several compression algorithms are supported, and the image data
Compression压缩 Several compression methods are supported, including lossy or lossless algorithms
Licensing授权 Covered by the Microsoft Open Specification Promise; while Microsoft holds patents against BMP, they have published a promise not to assert its patent rights as long as specific conditions are met. @@ -512,31 +496,31 @@ Typically, modern content should use [PNG](#png_portable_network_graphics) for l - + - + - + - + - + - +
MIME typeMIME 类型 image/gif
File extension(s)文件扩展名 .gif
Specification规范 GIF87a specification
GIF89a specification
Browser compatibility浏览器兼容性 All versions of Chrome, Edge, Firefox, Internet Explorer, Opera, and Safari
Maximum dimensions最大尺寸 65,536×65,536 pixels
Supported color modes支持的颜色模式 @@ -548,29 +532,29 @@ Typically, modern content should use [PNG](#png_portable_network_graphics) for l - + - + - + - + - + @@ -579,11 +563,11 @@ Typically, modern content should use [PNG](#png_portable_network_graphics) for l - + - +
Greyscale灰度 n/a GIF does not include a dedicated greyscale format.
True color真彩色 n/a GIF does not support true color pixels.
Indexed color索引颜色 8 Each color in a GIF palette is defined as 8 bits each of red, green, and blue (24 total bits per pixel).
Greyscale with alpha带有灰度的真彩色 n/a GIF does not provide a dedicated greyscale format.
True color with alpha带有透明度的真彩色 n/a GIF does not support true color pixels.
Compression压缩 Lossless (LZW)
Licensing授权 While the GIF format itself is open, the LZW compression algorithm was covered by patents until the early 2000s. As of July 7, 2004, all relevant patents have expired and the GIF format may be used freely @@ -608,32 +592,32 @@ If you use ICO files, you should use the BMP format, as support for PNG inside I - + - + - + - + - + - +
MIME typeMIME 类型 image/vnd.microsoft.icon (official), image/x-icon (used by Microsoft)
File extension(s)文件扩展名 .ico
Specification规范
Browser compatibility浏览器兼容性 All versions of Chrome, Edge, Firefox, Internet Explorer, Opera, and Safari
Maximum dimensions最大尺寸 256×256 pixels
Supported color modes支持的颜色模式 - + - + - + - + - + - + - + - + - + - + - + - + @@ -758,32 +742,32 @@ The JFIF (**J**PEG **F**ile **I**nterchange **F**ormat) specification describes
@@ -646,33 +630,33 @@ If you use ICO files, you should use the BMP format, as support for PNG inside I
Description
Greyscale灰度 1 Each bit represents a single pixel, which can be either black or white.
True color真彩色 8 and 16 Each pixel is represented by three values representing the red, green, and blue color components; each is D bits.
Indexed color索引颜色 2, 4, and 8 Each pixel is represented by a value which is one 2, 4, or 8 bits, serving as an index into the color table.
Greyscale with alpha带有灰度的真彩色 n/a BMP has no distinct grayscale format.
True color with alpha带有透明度的真彩色 8 and 16 Each pixel is represented by four values representing the red, green, blue, and alpha color components; each is D bits. @@ -691,21 +675,21 @@ If you use ICO files, you should use the BMP format, as support for PNG inside I Description
Greyscale灰度 1, 2, 4, 8, and 16 Each pixel consists of a single D-bit value indicating the brightness of the greyscale pixel.
True color真彩色 8 and 16 Each pixel is represented by three D-bit values indicating the level of the red, green, and blue color components.
Indexed color索引颜色 1, 2, 4, and 8 Each pixel is a D-bit value indicating an index into a color palette which is contained within a @@ -714,7 +698,7 @@ If you use ICO files, you should use the BMP format, as support for PNG inside I
Greyscale with alpha带有灰度的真彩色 8 and 16 Each pixel is represented by two D-bit values: the @@ -722,7 +706,7 @@ If you use ICO files, you should use the BMP format, as support for PNG inside I
True color with alpha带有透明度的真彩色 8 and 16 Each pixel is comprised of four D-pixel color @@ -734,14 +718,14 @@ If you use ICO files, you should use the BMP format, as support for PNG inside I
Compression压缩 BMP-format icons nearly always use lossless compression, but lossy methods are available. PNG icons are always compressed losslessly.
Licensing授权
- + - + - + - + - + - +
MIME typeMIME 类型 image/jpeg
File extension(s)文件扩展名 .jpg, .jpeg, .jpe, .jif, .jfif
Specification规范 jpeg.org/jpeg/
Browser compatibility浏览器兼容性 All versions of Chrome, Edge, Firefox, Internet Explorer, Opera, and Safari
Maximum dimensions最大尺寸 65,535×65,535 pixels
Supported color modes支持的颜色模式 @@ -795,29 +779,29 @@ The JFIF (**J**PEG **F**ile **I**nterchange **F**ormat) specification describes - + - + - + - + - + @@ -826,13 +810,13 @@ The JFIF (**J**PEG **F**ile **I**nterchange **F**ormat) specification describes - + - + @@ -849,19 +833,19 @@ This slowed PNG adoption, but it is now commonly used, especially when precise r
Greyscale灰度 n/a True greyscale can be supported using the single luma channel (Y).
True color真彩色 8 Each pixel is described by the red, blue, and green color components, each of which is 8 bits.
Indexed color索引颜色 n/a JPEG does not offer an indexed color mode.
Greyscale with alpha带有灰度的真彩色 n/a JPEG does not support an alpha channel.
True color with alpha带有透明度的真彩色 n/a JPEG does not support an alpha channel.
Compression压缩 Lossy; based on the discrete cosine transform
Licensing授权 As of October 27, 2006, all United States patents have expired.
- + - + - + - +
MIME typeMIME 类型 image/png
File extension(s)文件扩展名 .png
Specification规范 w3.org/TR/PNG
Browser compatibility浏览器兼容性 @@ -926,11 +910,11 @@ This slowed PNG adoption, but it is now commonly used, especially when precise r - + - +
Maximum dimensions最大尺寸 2,147,483,647×2,147,483,647 pixels
Supported color modes支持的颜色模式 @@ -942,14 +926,14 @@ This slowed PNG adoption, but it is now commonly used, especially when precise r - + - + - + - + - + - + - +
Greyscale灰度 1, 2, 4, 8, and 16 Each pixel consists of a single D-bit value indicating the brightness of the greyscale pixel.
True color真彩色 8 and 16 Each pixel is represented by three D-bit values @@ -958,7 +942,7 @@ This slowed PNG adoption, but it is now commonly used, especially when precise r
Indexed color索引颜色 1, 2, 4, and 8 Each pixel is a D-bit value indicating an index into a color palette which is contained within a @@ -967,7 +951,7 @@ This slowed PNG adoption, but it is now commonly used, especially when precise r
Greyscale with alpha带有灰度的真彩色 8 and 16 Each pixel is represented by two D-bit values: the @@ -975,7 +959,7 @@ This slowed PNG adoption, but it is now commonly used, especially when precise r
True color with alpha带有透明度的真彩色 8 and 16 Each pixel is comprised of four D-pixel color components: red, green, blue, and the alpha sample indicating how opaque the pixel is. @@ -986,11 +970,11 @@ This slowed PNG adoption, but it is now commonly used, especially when precise r
Compression压缩 Lossless, optionally indexed color like GIF
Licensing授权 ©2003 W3C (MIT, ERCIM, Keio), All Rights Reserved. W3C @@ -1029,19 +1013,19 @@ It's not generally useful for strictly bitmap or photographic images, although i - + - + - + - +
MIME typeMIME 类型 image/svg+xml
File extension(s)文件扩展名 .svg
Specification规范 w3.org/TR/SVG2
Browser compatibility浏览器兼容性 @@ -1081,18 +1065,18 @@ It's not generally useful for strictly bitmap or photographic images, although i - + - + - + - + - + - + - + - + - + - +
Maximum dimensions最大尺寸 Unlimited
Supported color modes支持的颜色模式 Colors in SVG are specified using CSS color syntax.
Compression压缩 SVG source may be compressed during transit using HTTP compression @@ -1100,7 +1084,7 @@ It's not generally useful for strictly bitmap or photographic images, although i
Licensing授权 ©2018 W3C (
MIME typeMIME 类型 image/tiff
File extension(s)文件扩展名 .tif, .tiff
Specification规范 https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577413_pgfId-1035272
Browser compatibility浏览器兼容性 No browsers integrate support for TIFF; its value is as a download format
Maximum dimensions最大尺寸 4,294,967,295×4,294,967,295 pixels (theoretical)
Supported color modes支持的颜色模式 @@ -1197,21 +1181,21 @@ As such, TIFF files are not useful within the context of web content, _but_ it's - + - + - + - + - + - + - + @@ -1275,15 +1259,15 @@ Provide a fallback in either [JPEG](#jpeg_joint_photographic_experts_group_image
Greyscale灰度 4 and 8 Each pixel consists of a single D-bit value indicating the brightness of the greyscale pixel.
True color真彩色 8 All true color RGB images are stored using 8-bits each of red, green, and blue.
Indexed color索引颜色 4 and 8 Each pixel is an index into a ColorMap record, @@ -1221,7 +1205,7 @@ As such, TIFF files are not useful within the context of web content, _but_ it's
Greyscale with alpha带有灰度的真彩色 4 and 8 Alpha information is added by specifying that there are more @@ -1231,7 +1215,7 @@ As such, TIFF files are not useful within the context of web content, _but_ it's
True color with alpha带有透明度的真彩色 8 Alpha information is added by specifying that there are more @@ -1245,13 +1229,13 @@ As such, TIFF files are not useful within the context of web content, _but_ it's
Compression压缩 Most TIFF files are uncompressed, but lossless PackBits and LZW compression are supported, as is lossy JPEG compression.
Licensing授权 No license required (aside from any associated with libraries you might use); all known patents have expired.
- + - + - + - +
MIME typeMIME 类型 image/webp
File extension(s)文件扩展名 .webp
Specification规范

RIFF Container Specification
{{RFC(6386, "VP8 Data Format and Decoding Guide")}} @@ -1292,7 +1276,7 @@ Provide a fallback in either [JPEG](#jpeg_joint_photographic_experts_group_image

Browser compatibility浏览器兼容性 @@ -1338,22 +1322,22 @@ Provide a fallback in either [JPEG](#jpeg_joint_photographic_experts_group_image - + - + - + - + @@ -1383,27 +1367,27 @@ static unsigned char square8_bits[] = {
Maximum dimensions最大尺寸 16,383×16,383 pixels
Supported color modes支持的颜色模式 Lossy WebP stores the image in 8-bit Y'CbCr 4:2:0 (YUV420) format. Lossless WebP uses 8-bit ARGB color, with each component taking 8 bits for a total of 32 bits per pixel.
Compression压缩 Lossless (Huffman, LZ77, or color cache codes) or lossy (VP8).
Licensing授权 No license required; source code is openly available.
- + - + - + - + - + - +
MIME typeMIME 类型 image/xbm, image-xbitmap
File extension(s)文件扩展名 .xbm
Specification规范 None
Browser compatibility浏览器兼容性 Firefox 1–3.5, Internet Explorer 1–5
Maximum dimensions最大尺寸 Unlimited
Supported color modes支持的颜色模式 @@ -1415,27 +1399,27 @@ static unsigned char square8_bits[] = { - + - + - + - + - + @@ -1444,11 +1428,11 @@ static unsigned char square8_bits[] = { - + - +
Greyscale灰度 1 Each byte contains eight 1-bit pixels.
True color真彩色 n/a n/a
Indexed color索引颜色 n/a n/a
Greyscale with alpha带有灰度的真彩色 n/a n/a
True color with alpha带有透明度的真彩色 n/a n/a
Compression压缩 Lossless
Licensing授权 Open source