View Issue Details

IDProjectCategoryView StatusLast Update
0035081FPCFCLpublic2020-08-02 16:00
Reporterhan Assigned ToMichael Van Canneyt  
Status closedResolutionno change required 
Summary0035081: FCL-image, FPreadTIFF cant read RGB32 and FPwriteTIFF can't write Gray8 or Gray16
Description1) The reader FPreadTIFF reads correctly RGB24, RGB48, RGB64 formats but fails to read correctly RGB32. See attached files.

2) For FPwriteTIFF, I can force monchrome images as follows:




Looking into the code this looks like a bug.
See also my posting:,44257.0.html
Steps To ReproduceFor 1) try attached files.
TagsNo tags attached.
Fixed in Revision41802
Attached Files



2019-02-14 00:24


tif test (461,291 bytes)


2019-02-14 00:26

reporter   ~0114096

Correction problem 2 is CAN NOT:
2) For FPwriteTIFF, I can't force monchrome images as follows:


2019-02-15 12:49

reporter   ~0114140

I think this is solved in latest version of FPReadTiff (cf 0033668).


2019-02-21 20:03

reporter   ~0114339

Last edited: 2019-02-21 21:03

View 2 revisions

I tried to compile the latest code.

Problem 1) reading RGB32 is solved.
Problem 2) writing Gray16 is still there. It can't write Gray16/Gray8. It always write the three colors.

Michael Van Canneyt

2019-03-26 23:27

administrator   ~0115071

in rev 41802 I enhanced the imgconv example program. It shows how to correctly specify the options to do grayscale.

You used
When you should use unit fptiffcmn and use the CONSTANTS
You will see that TiffPhotoMetric expands to 'TiffPhotoMetricInterpretation'. So because you wrote your value with the wrong name, the grayscaling was in fact not done.


2020-08-02 16:00

reporter   ~0124501


Issue History

Date Modified Username Field Change
2019-02-14 00:21 han New Issue
2019-02-14 00:22 Maxim Ganetsky Project Packages => FPC
2019-02-14 00:24 han File Added: tif test
2019-02-14 00:26 han Note Added: 0114096
2019-02-15 12:49 circular Note Added: 0114140
2019-02-15 13:52 Michael Van Canneyt Assigned To => Michael Van Canneyt
2019-02-15 13:52 Michael Van Canneyt Status new => assigned
2019-02-21 20:03 han Note Added: 0114339
2019-02-21 21:03 han Note Edited: 0114339 View Revisions
2019-03-26 23:27 Michael Van Canneyt Fixed in Revision => 41802
2019-03-26 23:27 Michael Van Canneyt Note Added: 0115071
2019-03-26 23:27 Michael Van Canneyt Status assigned => resolved
2019-03-26 23:27 Michael Van Canneyt Resolution open => no change required
2020-08-02 16:00 han Status resolved => closed
2020-08-02 16:00 han Note Added: 0124501