Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copys TIFF Lab with transparency and alpha output is wrong #1634

Closed
angelmixu opened this issue Apr 30, 2020 · 5 comments
Closed

Copys TIFF Lab with transparency and alpha output is wrong #1634

angelmixu opened this issue Apr 30, 2020 · 5 comments

Comments

@angelmixu
Copy link

Hi!

I'm using some TIFF files in LAB format with a transparency and additional alphas, and the output when copying the images are wrong.
Some channels are missed, or empty.

Here it is a .zip with the files:
tiff_files.zip

I'm using this version from homebrew in macOS:

% vips -v
vips-8.9.2-Tue Apr 21 09:26:11 UTC 2020

And using these command-line for copying the files:

vips copy "TIF LAB 8b TRANSP.tif" lab8_out.tif
vips copy "TIF LAB 16b TRANSP.tif" lab16_out.tif
@boxerab
Copy link

boxerab commented May 2, 2020

These are interesting files. Here are screenshots from opening these files in Krita: The first pair is 8 bit, the second pair is 16 bit. So, it looks like there is a problem with 16 bit.

btw, both lab8 and lab16 are 16 bit images.

TIF LAB 8 TRANSP

lab8_out

TIF 16 LAB TRANSP

lab16_out

Are these files being displayed as expected ?

@boxerab
Copy link

boxerab commented May 2, 2020

The other odd thing about these images is that the data is signed, including the alpha channels.

@boxerab
Copy link

boxerab commented May 3, 2020

It looks like vips is converting the alpha channel from 16 to 8 bit precision, and is not handling the signed nature of the data.

@angelmixu
Copy link
Author

Hi @boxerab , this is how I see the images in photoshop (the original images "TIF LAB*.tif" were generated using Photoshop):

In this case, the selected transparency channel is wrong and a channel is lost:
Screenshot 2020-05-04 at 09 36 22
Here the color information is lost, maybe because of choosing the wrong transparency channel? But still all channels are listed:
Screenshot 2020-05-04 at 09 36 10
Original 8bit:
Screenshot 2020-05-04 at 09 35 57
Original 16bit:
Screenshot 2020-05-04 at 09 35 38

The issue about the output for an 8bit LAB being a 16bit is this one: #1473

@angelmixu
Copy link
Author

angelmixu commented May 11, 2020

Hi! This commit in our custom branch looks like fixes this issue :)
angelmixu@b031680

At this moment I can't put it in libvips master as we have to fix some issues because our branch is way behind master and there will be some conflicts.

@jcupitt jcupitt closed this as completed Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants