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

Support RGBA images with proper color tables #178

Open
ctrueden opened this issue May 9, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@ctrueden
Copy link
Member

commented May 9, 2014

When opening RGBA images, or other images with an alpha channel, we can represent that with the current SCIFIO API—we just need to do a little additional processing.

Each "red" plane will have an associated ColorTable8 with four elements instead of three, with the first element being the red values and the fourth element being the alpha. Similarly, "green" planes will populate a ColorTable8 using the 2nd and 4th elements, and the "blue" planes will populate one which sets the 3rd and 4th elements. The 4th elements will be the same across all three channels. In this way, each component will preserve alpha information, and we can composite the three channels' color tables together as needed (as long as alpha values are averaged instead of added, which may not be the case currently, but which we can fix).

Migrated-From: http://trac.imagej.net/ticket/1908

@ctrueden ctrueden changed the title These images don't look right Support RGBA images with proper color tables May 9, 2014

@ctrueden

This comment has been minimized.

Copy link
Member Author

commented May 9, 2014

It will then be the responsibility of ImageJ and other viewers to deal with the color tables that SCIFIO gives back in the case of an alpha channel being present.

@hinerm hinerm added the enhancement label Mar 11, 2015

@hinerm hinerm added this to the 1.0.0 - Official Release milestone Mar 11, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.