Hello,
I'm working on a project with DEM tiff data and i need to access pixel color to retrieve elevation value of mutiple points.
I was successfull in loading the tiff image onto bitmap using this example
https://bugs.freepascal.org/file_download.php?file_id=28524&type=bug The problem is that i'm not able to get the correct color value from bitmap pixel access.
The tiff image i'm trying to read is 16 bit grayscale, so i'm using Lsa color space.
The issue present itself as following:
using photoshop on a pixel i get a reading of L = 2, while using TColorToFPColor(newImage.Canvas.Pixels[x,y]).ToLabA.L I get L = 0.008 .
What is going on? Do I need to set the colorspace on the bitimap in advance?
Actually I dont need to display the image at all, i just need to do calculations, so skipping the bitmap step would be good. Is it possible to use FPReadTiff directly to get a buffer of the pixels? (Documentation on this?)
I hope I could exlain mysef clearly enough.
Any help/suggestion appreciated
Thanks
Frate