raw image to bmp,tiff

Posted on 2003-02-26
Medium Priority
Last Modified: 2006-11-17
Hi everybody

I have a b/w 10-bit raw image and I need to create a image file in a standard format (bmp or tiff). How can I convert 10-bit to any other (16-bit, 24-bit)? Where can I get specifications to do that? By the way, I using java to develop the application.
Question by:alfarod
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

lordxeroth earned 200 total points
ID: 8110053
Regarding my answer to this question:

There is an easier and faster way to convert 10 bit to 16 or whatever. Though it is not a precise conversion it might be suitable for your needs.
Take those 10 bits and add zero's to the end till you got 16, 24, .... So basicaly you shift the 10 bit to the right to create 16 bit.

The formula that coresponds with this is:
value16 = value10 * 2^16/2^10 = value10 * 2^6 (or righshift  value10 6 times)

The correct formula should be:
value16 = value10 + (2^16 - 1)/(2^10 - 1)

But since 1 is realtivily small compared to 2^16 or even 2^10, it can be ignored. But this of course depends on the application you want to have. Just for visualisation it is more than enough.

I'm not very familiar with the BMP but I do believe that it consistes of 8 bit values of the 3 major colours: Red, Green and Blue. For gray you need an equal amount of each colour. So what you probably need to do is convert your 10 bit image to an 8 bit image since you need 8 bit for each colour. In this case I do recomend to use the correct formula as described above. You might even want to do some filtering to smoothen the image.

There might be some other standards that support 16 bit grayscale (or 24 bit grayscale) bit I doubt that the bmp format supports this.

kind regards,

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Six Sigma Control Plans

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question