Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 #59606 is a reply to message #59605] Tue, 14 February 2023 09:02 Go to previous messageGo to previous message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi Mirek,

Thanks, jpeg-tiff works now. Smile

As for your question of merging my latest posted tifupp.cpp, I mostly think you could, but please consider the following:

1. The issue with:

https://www.marinha.mil.br/chm/sites/www.marinha.mil.br.chm/ files/geotiff/1511geotiff.zip

is simply solved by entirely disabling the tmpfile in FetchPage(). I bet you would come up with a more advanced solution yourself.

2. The crash with some of the GeoTIFF_Samples_from_zi_imaging, e.g. image1.tif, due to image flipping remains unsolved:

https://www.ultimatepp.org/forums/index.php?t=getfile&id =6753&

These orientation related issues need to be solved in one way or another. When going with libtiff directly, I ended up requesting the image in its stored orientation stated by TIFFTAG_ORIENTATION. This way I could avoid the internal flipping code which caused crashes. (Then I flipped it afterwards to a natural U++ Image orientation and corrected the georeferencing for the new orientation.) It is important to note that even if the image would be flipped inside the plugin to U++ Image orientation, the original orientation is still important to know in order to fix the georeferencing information. In my opinion, optimally the plugin/TIF could return the images readily flipped to U++ Image orientation and maybe also with a georeferencing solution corrected accordingly.

Best regards,

Tom

EDIT: I looked at our earlier work on plugin/JPG EXIF orientation and flipping: Yes, the image is pre-flipped and returned in its U++ orientation. So it would seem logical to do the same in plugin/TIF.

EDIT2: I came up with an idea to avoid the flipping crash. This involves further changes to tifupp.cpp, so please stand-by until I finish with this one.

EDIT3: OK, now I have prevented libtiff flipping crash and enabled correct Raster flipping, i.e. the same code that flips JPEG images. Just need to adjust the geomatrix to reflect this change... I will return.

[Updated on: Tue, 14 February 2023 11:51]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: BufferPainter Text Clips all text when partial off screen
Next Topic: Image::GetDPI() doesn't return Size(0, 0)
Goto Forum:
  


Current Time: Fri May 10 14:02:50 CEST 2024

Total time taken to generate the page: 0.01826 seconds