Opened 10 years ago
Closed 4 years ago
#8429 closed Feature Requests (fixed)
[gil] Reading TGA images with origin in upper left-hand corner.
Reported by: | anonymous | Owned by: | Stefan Seefeld |
---|---|---|---|
Milestone: | To Be Determined | Component: | gil USE GITHUB |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: | mateusz@… |
Description
Hi,
I know the TGA support is work in progress, but...
I have some TGA files that have bit 5 set in the "Image Descriptor". This causes reader_backend::read_header
to throw:
"Unsupported descriptor for targa file"
The quick-n-dirty fix is just to mask out bit 5 in the check and update reader::apply
such that
read_data
operates on a
flipped_up_down_view
if the bit is set.
Unfortunately I don't have any sample images that I can attach (legal reasons), but when I do I will.
Anyway hope the above is of some use.
Attachments (2)
Change History (8)
by , 10 years ago
comment:1 by , 10 years ago
I am not an expert on image formats!
I think you are strictly adhering to the Truevision format. And I think that relaxing that requirement may have consequences w.r.t. run length encoding. It's more complicated than I first thought. None-the-less I would be grateful if you could give this issue your consideration.
comment:2 by , 10 years ago
I used GIMP2 to generate all four combinations of:
- RLE compressed/uncompressed and
- Origin bottom left/top left
With the above patch applied read_image
loaded them okay and they saved (as PNG) the right way up.
comment:3 by , 8 years ago
Version: | Boost 1.54.0 → Boost Development Trunk |
---|
comment:4 by , 6 years ago
Cc: | added |
---|
comment:5 by , 5 years ago
Owner: | changed from | to
---|
comment:6 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This should be fixed as part of
https://github.com/boostorg/gil/issues/33 https://github.com/boostorg/gil/pull/42
If it is not working, please reopen new issue on GitHub
Illustration of changes (quick-n-dirty patch)