Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Issue loading TIFF images with plugin/TIF
Re: Issue loading TIFF images with plugin/TIF [message #59526 is a reply to message #59523] |
Tue, 17 January 2023 10:56   |
Tom1
Messages: 1302 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi,
There is another issue reading the following TIFF image with plugin/TIF using e.g. examples/ImageView:
https://www.marinha.mil.br/chm/sites/www.marinha.mil.br.chm/ files/geotiff/1511geotiff.zip
A large area in the center of the image gets black. (E.g. Windows built-in photo viewer shows the image correctly.)
This can be fixed in tifupp.cpp FetchPage():
...
bool TIFRaster::Data::FetchPage()
{
if(page_error)
return false;
if(page_fetched)
return true;
cache_size = 0;
rows.Clear();
int64 bytes = row_bytes * (int64)height;
/* if(bytes >= 1 << 28) { // << Commenting this out fixes the issue with 1511geotiff.tif
tmpfile = GetTempFileName();
if(!filebuffer.Open(tmpfile, FileStream::CREATE)) {
page_error = true;
return false;
}
filebuffer.SetSize(bytes);
if(filebuffer.IsError()) {
filebuffer.Close();
FileDelete(tmpfile);
page_error = true;
return false;
}
rows.Alloc(size.cy);
}
else
*/ imagebuf.SetCount(size.cy * row_bytes, 0);
...
However, I think there is (or has been) some reason to use tmpfile for big images...
Best regards,
Tom
|
|
|
 |
|
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 23:50:22 CEST 2025
Total time taken to generate the page: 0.01059 seconds
|