Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Issue loading TIFF images with plugin/TIF
Issue loading TIFF images with plugin/TIF [message #59517] |
Fri, 13 January 2023 17:44  |
Tom1
Messages: 1302 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi Mirek,
I get a crash when loading certain TIFF -images with plugin/TIF. (I'm testing with U++ examples/ImageView.) Debugger takes me to gtTileContig() in tif_getimage.c:
if (flip & FLIP_HORIZONTALLY) {
uint32 line;
for (line = 0; line < h; line++) {
uint32 *left = raster + (line * w);
uint32 *right = left + w - 1;
while ( left < right ) {
uint32 temp = *left;
*left = *right;
*right = temp;
left++;
right--;
}
}
}
The problem is that 'raster' is a null pointer already when TIFFRGBAImageGet() is called from tifupp.cpp.
bool res = TIFFRGBAImageGet(this, 0, width, height);
Crashing depends on the filling order of the image and associated flipping thereof.
I have attached a sample set of GeoTIFF images (downloaded from the internet many years ago) that are readable if I comment out the flipping code. However, they obviously load in whatever orientation they like.
Could you please look at this issue, clear the crash and hopefully also solve the problem with orientation? The way 'TIFFRGBAImageGet' is used here is a bit too fascinating for me to handle.
BTW: I must say that I was both surprised and very pleased when I discovered that plugin/TIF internally supported GeoTIFF tags in such a clean and elegant manner. I'm hoping to replace my old GeoTIFF reader with plugin/TIF now.
Thanks and best regards,
Tom
EDIT: Please note that the attached data set also includes files with name tp_image*.tif using some old proprietary Intergraph tag 33918 and associated packets. I'm not expecting to support those old non-standard parts of intergraph files. However, it would be nice to be able to deal with the TIFFTAG_GEOTIEPOINTS tag even without TIFFTAG_GEOPIXELSCALE using the associated mappings.
Additionally it would be useful to store the data in GeoKeys as metadata. I mean something like attr.GetAdd("ProjectedCSTypeGeoKey") = Value((int)epsgcode); and equivalent for all found GeoKeys. This would enable extending handling of specific files without further changes to plugin/TIF.
[Updated on: Sat, 14 January 2023 22:28] Report message to a moderator
|
|
|
 |
|
Issue loading TIFF images with plugin/TIF
By: Tom1 on Fri, 13 January 2023 17:44
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: Tom1 on Mon, 16 January 2023 17:42
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: Tom1 on Tue, 17 January 2023 10:56
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: Tom1 on Wed, 18 January 2023 11:12
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: Tom1 on Thu, 19 January 2023 11:55
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: Tom1 on Thu, 19 January 2023 20:29
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: Tom1 on Tue, 24 January 2023 14:04
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: mirek on Tue, 14 February 2023 00:46
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: Tom1 on Tue, 14 February 2023 09:02
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: mirek on Tue, 14 February 2023 15:28
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: Tom1 on Tue, 14 February 2023 20:54
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: Tom1 on Wed, 15 February 2023 07:56
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: mirek on Wed, 15 February 2023 08:15
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: Tom1 on Wed, 15 February 2023 08:26
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: Tom1 on Thu, 16 February 2023 17:29
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: mirek on Fri, 17 February 2023 11:04
|
 |
|
Re: Issue loading TIFF images with plugin/TIF
By: Tom1 on Fri, 17 February 2023 16:37
|
Goto Forum:
Current Time: Tue Apr 29 18:58:34 CEST 2025
Total time taken to generate the page: 0.00865 seconds
|