From 3a6492f2514922a5c134b70e56fdd5ccb43ff968 Mon Sep 17 00:00:00 2001 From: "Sergey \"Shnatsel\" Davidoff" Date: Fri, 6 Mar 2026 15:46:37 +0000 Subject: [PATCH] More docs on the predictor --- src/encoder/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/encoder/mod.rs b/src/encoder/mod.rs index 03e89a9..ed28b8e 100644 --- a/src/encoder/mod.rs +++ b/src/encoder/mod.rs @@ -165,9 +165,13 @@ impl TiffEncoder { /// A predictor is used to simplify the file before writing it. This is very /// useful when writing a file compressed using LZW or DEFLATE as it can improve compression ratio /// + /// The floating-point predictor is not universally supported. While most software can handle it, + /// Safari, Mac OS Preview and ImageJ Java library cannot. Don't use a predictor for float data + /// for maximum compatibility at the cost of compression ratio. + /// /// The chosen predictor should match the data type being encoded. /// Encoding floating-point data with `Predictor::Horizontal` is technically possible, - /// but the compression is less efficient, and some decoders may reject such files. + /// but rarely beneficial, and some decoders may reject such files. pub fn with_predictor(mut self, predictor: Predictor) -> Self { self.predictor = predictor;