From 657d0414f07d37ec8abecc02879154834bf7a009 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 12 Feb 2026 21:51:01 +1100 Subject: [PATCH 1/2] Merge PFM into PPM --- docs/handbook/image-file-formats.rst | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst index 35ec99ece..add42a3a0 100644 --- a/docs/handbook/image-file-formats.rst +++ b/docs/handbook/image-file-formats.rst @@ -828,16 +828,6 @@ PCX Pillow reads and writes PCX files containing ``1``, ``L``, ``P``, or ``RGB`` data. -PFM -^^^ - -.. versionadded:: 10.3.0 - -Pillow reads and writes grayscale (Pf format) Portable FloatMap (PFM) files -containing ``F`` data. - -Color (PF format) PFM files are not supported. - Opening ~~~~~~~ @@ -1081,13 +1071,18 @@ following parameters can also be set: PPM ^^^ -Pillow reads and writes PBM, PGM, PPM and PNM files containing ``1``, ``L``, ``I`` or -``RGB`` data. +Pillow reads and writes PBM, PGM, PPM, PNM and PFM files containing ``1``, ``L``, ``I``, +``RGB`` or ``F`` data. "Raw" (P4 to P6) formats can be read, and are used when writing. Since Pillow 9.2.0, "plain" (P1 to P3) formats can be read as well. +Since Pillow 10.3.0, grayscale (Pf format) Portable FloatMap (PFM) files containing +``F`` data can be read and used when writing as well. + +Color (PF format) PFM files are not supported. + QOI ^^^ From f71d74eec2300c42578632f6cb83d3bf3e9dbebb Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Fri, 13 Feb 2026 18:29:41 +1100 Subject: [PATCH 2/2] Use versionadded Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- docs/handbook/image-file-formats.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst index add42a3a0..a9fd764e6 100644 --- a/docs/handbook/image-file-formats.rst +++ b/docs/handbook/image-file-formats.rst @@ -1076,10 +1076,12 @@ Pillow reads and writes PBM, PGM, PPM, PNM and PFM files containing ``1``, ``L`` "Raw" (P4 to P6) formats can be read, and are used when writing. -Since Pillow 9.2.0, "plain" (P1 to P3) formats can be read as well. +.. versionadded:: 9.2.0 + "Plain" (P1 to P3) formats can be read. -Since Pillow 10.3.0, grayscale (Pf format) Portable FloatMap (PFM) files containing -``F`` data can be read and used when writing as well. +.. versionadded:: 10.3.0 + Grayscale (Pf format) Portable FloatMap (PFM) files containing + ``F`` data can be read and used when writing. Color (PF format) PFM files are not supported.