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

Tiff writer does not specify ExtraSamples tag for alpha channel #56

Closed
iger opened this issue Mar 15, 2014 · 3 comments
Closed

Tiff writer does not specify ExtraSamples tag for alpha channel #56

iger opened this issue Mar 15, 2014 · 3 comments
Labels

Comments

@iger
Copy link
Contributor

iger commented Mar 15, 2014

According to TIFF6 specification, if there are extra samples (values) in pixels, an ExtraSamples tag is required to specify their meaning.

ExtraSamples
...
The default is no extra samples. This field must be present if there are extra
samples.

I believe it should specify Unassociated alpha data (value 2) i.e. non-premultiplied alpha.

@Twinside
Copy link
Owner

Is there a use case where this is really problematic?

iger added a commit to iger/Juicy.Pixels that referenced this issue Mar 15, 2014
It seems to work, but it still does not specify ExtraSamples
tag to state that stored data is in fact an alpha channel.
See bug Twinside#56 .
@Twinside
Copy link
Owner

Ah ok, make sense for YA* formats, I'll look into it

@Twinside Twinside added the bug label Mar 17, 2014
@iger
Copy link
Contributor Author

iger commented Mar 17, 2014

Yes, it's for specifying transparency and it should only be present if there are extra values such as alpha in the data stream.

Sorry about not making myself clear.

I added the bug, because saving of RGBA images was already implemented and it (also) did not generate the tags. On programs I have tried (eye of gnome, gimp, Image Magick) the presence of the tag did not seem to make a difference on either RGBA or YA images. Programs seem to have good defaults as this is the most common use of an extra channel.

So no, it is not problematic, for now, for my use along with these programs.

Still, the generated RGBA and YA files are not proper tiffs and there are other valid uses of extra channels.

iger added a commit to iger/Juicy.Pixels that referenced this issue Mar 17, 2014
It seems to work, but it still does not specify ExtraSamples
tag to state that stored data is in fact an alpha channel.
See bug Twinside#56 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants