[gimp-web-devel/pat/bootstrap] content: improve the standard page.



commit e16b5e2a50e3d5ae1a20c80447d0dd542475ad25
Author: Jehan <jehan girinstud io>
Date:   Sun Sep 11 14:24:36 2022 +0200

    content: improve the standard page.
    
    - Add details about many image formats we support now.
    - Create some new sections and move information when necessary.

 content/core/standards.md | 234 +++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 210 insertions(+), 24 deletions(-)
---
diff --git a/content/core/standards.md b/content/core/standards.md
index c8239b0..8e6a86d 100644
--- a/content/core/standards.md
+++ b/content/core/standards.md
@@ -8,25 +8,138 @@ weight = 0
 
 GIMP is supposed to integrate well into your workflow. Thus is
 needs to interoperate with other applications and your desktop.
-Standards are there to make this happen and so we try to follow
+Standards are there to make this happen, so we try to follow
 established (and sometimes even proposed) standards. Below you
 will find a list with links to specifications that a GIMP
 developer may find useful.
 
 ## Image File Formats
 
-[Extensible Markup Language (XML)](http://www.w3.org/XML/)
-: Describes the XML markup language, used to store the menu layout, the
-startup tips, help indices and other things.
-
-
-[Graphics Interchange Format](http://www.w3.org/Graphics/GIF/spec-gif89a.txt)
+These are image formats supported in GIMP or not. Note that GIMP has a
+policy to support every image format, however good or bad it is, at
+least as an import format. For instance, being able to restore old
+images in outdated and long-forgotten formats is definitely a real
+use case.
+
+[APNG](https://wiki.mozilla.org/APNG_Specification)
+: Extension of the PNG format, adding support for animated images. It is
+backward compatible with PNG-supporting software where it would simply
+show the first frame instead of an animation. While adoption was
+stalling for years, it gained more support across browsers recently.
+It is not supported in GIMP yet. The biggest reason is that it relied on
+a patched `libpng`, using the same namespace as legacy `libpng` and not
+distributed commonly by distributions. This is apparently how it is
+shipped, bundedl, in Firefox historically. Nevertheless it seems that
+some browsers, like
+[Chromium](https://chromium.googlesource.com/chromium/src/+/7d2b8c45afc9c0230410011293cc2e1dbb8943a7),
+have managed to support it using only legacy `libpng`. It would need to
+be studied.
+
+[AVIF (AV1 Image File Format)](https://aomediacodec.github.io/av1-avif/)
+: The royalty free counterpart of `HEIC`, using <abbr title="AOMedia
+Video 1">[AV1](https://aomediacodec.github.io/av1-spec/av1-spec.pdf)</abbr>
+image encoding and the same <abbr title="High Efficiency Image File
+Format">HEIF</abbr> container format.
+It supports up to 12-bit per channel, animation, HDR images and more.
+GIMP uses [libheif](https://github.com/strukturag/libheif) for support,
+though there are talks that moving to
+[libavif](https://github.com/AOMediaCodec/libavif) could be better to
+support some features, such as animated images.
+
+
+[BMP](https://en.wikipedia.org/wiki/BMP_file_format)
+: Legacy image format with no or low compression and very simple to
+implement. There doesn't seem to be centralized format specifications
+though we find various pages on the web describing its structure.
+From a quick skimming, the Wikipedia page itself might be all there is
+to know to encode and decode a `BMP` file.
+
+
+[DDS (DirectDraw Surface)](https://docs.microsoft.com/en-us/windows/win32/direct3ddds/dx-graphics-dds)
+: Microsoft format for storing data compressed with the previously
+proprietary S3 Texture Compression (S3TC) algorithm, which can be
+decompressed in hardware by GPUs.
+It seems to be quite used in the video game industry in particular for
+assets such as textures and other images mapped on 3D objects.
+
+
+[GIF (Graphics Interchange Format)](http://www.w3.org/Graphics/GIF/spec-gif89a.txt)
 : Describes the GIF file format, used in the GIF plug-in. GIF
-is bad, don't use it.
+is bad for various reasons, so modern programs should not use it for
+anything else than supporting people's files and use cases (i.e. import
+and export, as we do in GIMP). Yet it kept quite a popularity for very
+long as the one image format to do small cycle animations on the web.
+These last years, it slowly loses its throne to new formats such as
+`WebP`, though it is still quite omnipresent.
+
+
+[HEIC](https://www.itu.int/rec/T-REC-H.265)
+: Modern image format, supporting up to 12-bit per channel, animation,
+HDR images and more, using <abbr title="High Efficiency Video
+Coding">HEVC</abbr> image encoding and the <abbr title="High Efficiency
+Image File Format">HEIF</abbr> container format.
+Unfortunately `HEVC` has [patent
+issues](https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#Patent_holders),
+unlike its `AVIF` counterpart, using `AV1`, which was created
+specifically to be royalty-free by the Alliance for Open Media
+(AOMedia).
+This is why many Free Software distributors do not wish to package
+`HEIC` support, hence why our `file-heif` plug-in runs runtime tests to
+determine support for `AVIF` or `HEIC`, making it in particular able to
+support only `AVIF`.
+GIMP uses [libheif](https://github.com/strukturag/libheif) for support.
+[HEVC specifications](https://www.itu.int/rec/T-REC-H.265) are freely
+available.
+
+
+[HEIF](https://www.iso.org/standard/66067.html)
+: The image and animation container used for `AVIF` and `HEIC`.
+As ISO standard, the specifications are not freely available. GIMP
+supports this container by supporting `AVIF` and `HEIC` image formats.
 
 
 [JPEG (Joint Photographic Experts Group)](http://www.w3.org/Graphics/JPEG/)
-: Describes the JPEG JFIF file format, used in the JPEG plug-in.
+: Describes the JPEG JFIF file format, used in the JPEG plug-in. JPEG is
+lossy regarding pixel data (though there is a lossless JPEG standard,
+currently [unsupported by
+libjpeg-turbo](https://github.com/libjpeg-turbo/libjpeg-turbo/issues/402),
+the library we rely on), and only up to 8-bit per channel. Once again,
+not entirely true: 12-bit support is added as an extension of the JPEG
+specification and `libjpeg-turbo` has support, but it needs to be set at
+compile time and only one variant — 8 or 12-bit — at the same time.
+[Plans exist to provide both 8 and 12-bit support to a
+program](https://github.com/libjpeg-turbo/libjpeg-turbo/issues/199#issuecomment-493764983)
+but there is no timeline when it will happen.
+Anyway similarly to GIF for small animated images, this format (in the
+8-bit variant) is still the most popular format for photography on the
+web, despite its quality issues.
+
+
+[JPEG 2000](https://jpeg.org/jpeg2000/)
+: New-ish format, still by the Joint Photographic Experts Group, which
+supports lossy and lossless compression, high bit depth (up to 38-bits
+per channel!). It compresses a bit better than legacy JPEG but this is
+not really its focus.
+This format clearly didn't gain a lot of popularity, at least towards
+the general public. Its biggest usage though is for the cinema market as
+it is the image format used for image tracks in the <abbr title="Digital
+Cinema Package">DCP</abbr> container format, which is the de-facto
+standard in the cinema industry these days as it replaced films reels in
+theaters using digital movie projectors.
+As [ISO standards](https://jpeg.org/jpeg2000/workplan.html), the
+specifications are not freely available. For support, GIMP uses
+[OpenJPEG](http://www.openjpeg.org/), one of the reference
+implementations.
+
+
+[JPEG XL](https://jpeg.org/jpegxl/index.html)
+: New format, still by the Joint Photographic Experts Group, which
+supports lossy and lossless compression, high bit depth, and supposed to
+compress a lot better than legacy JPEG. As [ISO
+standards](https://www.loc.gov/preservation/digital/formats/fdd/fdd000536.shtml#specs),
+the specifications are not freely available. The reference
+implementation though, [libjxl](https://github.com/libjxl/libjxl), is
+what we use in GIMP.
 
 
 [JNG (JPEG Network Graphics) Format](http://www.libpng.org/pub/mng/spec/jng.html)
@@ -39,12 +152,39 @@ plug-in.
 : Describes the MNG file format, used in the MNG plug-in.
 
 
+[OpenRaster](https://www.openraster.org/)
+: Meant to be an open exchange format for raster editing software. It is
+still a bit bare and evolution has stalled these last years. GIMP
+contributors originally contributed as part of its creation process.
+
+
+[PDF (Portable Document Format)](https://www.pdfa.org/resource/pdf-specification-index/)
+: File format for document layout. It contains vector as well as raster
+images, text and more.
+GIMP uses `libpoppler` for import and `libcairo-pdf` for export.
+It doesn't support any of the `PDF/X` variants yet, but this will need
+to happen for good printing support. One of the Free Software with good
+`PDF/X` support is Scribus, making it a good complementary software to
+GIMP for doing printing jobs.
+
+
 [Portable Network Graphics (PNG)](http://www.w3.org/TR/PNG/)
 : Describes the PNG file format, used in the PNG plug-in. GIMP
 also reads patterns in the PNG file format and it stores
-thumbnails as PNG images.
+thumbnails as PNG images. It supports up to 16-bit per component and
+proper alpha channel.
+It is widely used on the web, especially for flat colored images (logos
+or other design) where it can even sometimes end up in smaller files (or
+close size, yet better quality) than `JPEG`, and even for photography or
+complex images when quality matters more than size (thanks to its
+lossless property regarding pixel data).
 
 
+[PSD (Photoshop Document)](https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/)
+: Core file format for Photoshop project files. A public specification
+is available though it is not always very complete, missing features or
+details.
+
 [Scalable Vector Graphics (SVG) 1.1](http://www.w3.org/TR/SVG/)
 : Describes the SVG file format, used in the SVG plug-in. GIMP
 uses SVG for import and export of paths and it also loads
@@ -57,18 +197,46 @@ the
 [Unofficial TIFF Home Page](http://www.awaresystems.be/imaging/tiff.html).
 
 
-[Extensible Metadata Platform (XMP)](http://www.adobe.com/products/xmp/main.html)
-: Describes XMP, a labeling technology that allows to embed
-data about a file, known as metadata, into the file itself.
-
-
 [Digital Negative (DNG)](http://www.adobe.com/products/dng/pdfs/dng_spec.pdf)
 : Specifies DNG, a format, proposed by Adobe, aiming to become
 a standard for storing raw data from digital cameras.
+As for most other "RAW image formats", GIMP doesn't support them
+natively anymore and instead promotes passing through a RAW image
+developer, such as `darktable` or `RawTherapee`. GIMP has an
+infrastructure system redirecting automatically RAW images to one of
+these software if available, then get the result back for further
+processing. Other RAW developer software may be added to GIMP by
+creating proper plug-ins with a `GimpLoadProcedure` flagged with the
+`gimp_load_procedure_set_handles_raw()` function.
+
+
+[WebP](https://developers.google.com/speed/webp/docs/riff_container)
+: Modern image format, supporting lossy and lossless compression,
+animation and transparency. It is often described as a replacement for
+GIF, JPEG and PNG, but not that much further as it doesn't support [high
+bit depth or many color
+models](https://developers.google.com/speed/webp/faq#what_color_spaces_does_the_webp_format_support).
+This makes it good for web usage, but less for advanced image usages
+where other recent formats make take the higher road.
+GIMP supports this format through the
+[libwebp](https://developers.google.com/speed/webp) reference library.
+
+## Generic File Formats
+
+[Extensible Markup Language (XML)](http://www.w3.org/XML/)
+: Describes the XML markup language, used to store the menu layout, the
+startup tips, help indices and other things.
+
+## Metadata File Formats
+
+[Exif (Exchangeable image file format)](https://www.cipa.jp/std/documents/e/DC-X008-Translation-2019-E.pdf)
+: Widely used metadata format.
 
+[Extensible Metadata Platform (XMP)](http://www.adobe.com/products/xmp/main.html)
+: Describes XMP, a labeling technology that allows to embed
+data about a file, known as metadata, into the file itself.
 
 ## Color Management
-<dl>
 
 [sRGB Color Space](http://www.w3.org/Graphics/Color/sRGB)
 : Describes sRGB, a color space proposed as a standard default
@@ -86,15 +254,34 @@ used to translate color data between device colorspaces.
 : This is a specification for associating ICC color profiles
 with X screens. GIMP 2.4 implements this proposed standard. 
 
+## Color Compositing
+
+Our compositing and blending algorithms are not necessarily exactly
+the below W3C specifications, yet they contain base concepts and
+definitions of the process behind compositing images into one combined
+result:
+
+* [Compositing and Blending Level 1](https://www.w3.org/TR/compositing-1/)
+* [SVG Compositing Specification](https://www.w3.org/TR/SVGCompositing/)
 
 ## Desktop Standards
-<dl>
+
+[AppStream](https://www.freedesktop.org/software/appstream/docs/)
+: Metadata to describe a software. It is used massively on Linux by
+software centers (such as GNOME Software or KDE Discover), which is
+where they get a software name, description, screenshots, release
+information and more. Our AppStream file is visible in
+`desktop/org.gimp.GIMP.appdata.xml.in.in`.
+We also generates the release note tab of the "Welcome Dialog" from the
+release data in our AppStream file.
+Finally we also use this format as metadata for the new extension format
+of GIMP.
+
 
 [Desktop Entry 
Specification](http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html)
 : This document describes desktop entries: files describing
 information about an application such as the name, icon, and
-description. GIMP installs such
-a <filename>.desktop</filename> file.
+description. GIMP installs such a `.desktop` file.
 
 
 [Desktop Message Bus](http://dbus.freedesktop.org/doc/dbus-specification.html)
@@ -140,7 +327,6 @@ this standard and dropped support for the old-fashioned
 
 
 ## Standards specific to the X window system
-<dl>
 
 [Clipboards](http://standards.freedesktop.org/clipboards-spec/clipboards-latest.txt)
 : Not a formal specification, but explains the consensus of the
@@ -185,15 +371,15 @@ background colors. GTK+ hides this from us.
 
 ## Programming Standards
 
-[GIMP Hackordnung](http://developer.gimp.org/HACKING)
-: The last section from the file HACKING as found in the GIMP
-source tree explains how the GIMP source code should be
-formatted.
+[GIMP Coding Style guidelines](https://gitlab.gnome.org/GNOME/gimp/-/blob/master/devel-docs/CODING_STYLE.md)
+: Our project coding style guidelines. It explains how the GIMP source
+code should be formatted.
 
 [GNU coding standards](http://www.gnu.org/prep/standards/)
 : A guide to writing portable, robust and reliable
 programs. Also defines the
 [GNU coding style](http://www.gnu.org/prep/standards/standards.html#Formatting).
+Our own Coding Style originally derivates from the GNU Coding style.
 
 [ISO/IEC 9899](http://www.nirvani.net/docs/ansi_c.pdf)
 : ISO 9899 is the international standard for the C programming language.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]