Biometrology Posted February 9, 2012 Report Share Posted February 9, 2012 Hi folks, I'm trying to save some U16 data in PNG format with a color palette. Saving without the color palette works fine, grayscale image as expected. But saving with a palette gives exactly the same result. What am I missing? Thanks! Alex Quote Link to comment
asbo Posted February 9, 2012 Report Share Posted February 9, 2012 I don't have Vision installed, so I can't play with it, but maybe this is related? Why Can I Not Save an I16 Image With an IMAQ Palette (Temperature, Binary, etc...)? However, it deals with signed 16-bit data, not unsigned. Quote Link to comment
Biometrology Posted February 9, 2012 Author Report Share Posted February 9, 2012 Thanks asbo, I don't know why I couldn't fond that information...The problem lies in the fact that these predefined palettes for IMAQ are all 256 element array palettes. A signed 16-bit image (I16) has 65,536 possible values so these will not work with the IMAQ predefined palettes. Kind of of obvious really, if there aren't enough values in the colour map it won't work. But it's a bit disappointing that this all happens silently without any helpful error messages... I'll try converting to U8 as the images for presentation rather than analysis. A. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.