views:

17

answers:

1

Hi,

I'm trying to let the user import an image in my windows application, in any pixelformat, but i need to save the image in 16bpp4444 format, and that is not an option for pixelformat in .Net imaging class.

Any ideas on how to do this?

Thanks!

A: 

Right, not an option. There's no knob that you can tweak to make it a supported format, neither GDI+ nor WPF have an encoder for that format. You'll need to find a graphics library. Start with the Big Dog, Lead Tools. You'd better contact them first to ask if they support that format, it is very unusual. I've never heard of it.

Hans Passant
Is there any way to do pixel manipulation on the current image to achieve the correct format?
David
I don't know, never heard of the format. With only 16 colors per channel, you'd almost certainly need a palette (aka indexed format). Do you have a program that knows how to read these images or are you just making this up?
Hans Passant
4-bit transparency is not supported in .NET, and all transparency converts the bitmap internally to Format32bppArgb. As Hans said, you may want to reach out to Lead Tools to see if they have a codec that supports this.
Otaku
i have checked with them, and they don't currently support that file format. We have a piece of hardware that reads these type of image files.
David
You'll need a spec from the manufacturer of the device to know exactly what that image file needs to look like. From there, you've got a shot at writing your own encoder.
Hans Passant
Thanks for your help with this.
David