fcl-image, how to read if an image is grayscale lazarus / 39-Graphics ---------------------------------------------------------------------- han · 2019-02-18 10:07 Using fcl-image, I can write 16 bit grayscale images E.g. Code: [Select]  with TFPWriterPNG(Writer) do   begin     indexed := false;     wordsized := true;     UseAlpha := false;     GrayScale := true;   end; However there seems no way to read these parameters GrayScale or Wordsize in readerPNG.  In astronomy grayscale images are very common so I like to read this. Is this not possible or do I oversee something? Same question for the TIFF format. For the time being I doing the following temporary: Code: [Select]  with image do {temporary till reader grayscale is implemented in fcl-image}   grayscale:=((Colors[0,0].red=Colors[0,0].green) and               (Colors[0,0].red=Colors[0,0].blue) and               (Colors[width-1,0].red=Colors[width-1,0].green) and               (Colors[width-1,0].red=Colors[width-1,0].blue) and               (Colors[0,height-1].red=Colors[0,height-1].green) and               (Colors[0,height-1].red=Colors[0,height-1].blue) and               (Colors[width-1,height-1].red=Colors[width-1,height-1].green) and               (Colors[width-1,height-1].red=Colors[width-1,height-1].blue)); Update 2019-2-20. Put in a request to improve the fpreaderPNG: https://bugs.freepascal.org/view.php?id=35124 ---------------------------------------------------------------------- circular · 2019-02-21 22:24 There an ImageCount and Images property where you can access the TTiffIFD structure. From there you have all the properties of the image.