Solved

Saving of 16/24-bit bitmap

Posted on 1998-09-12
1
473 Views
Last Modified: 2013-11-20
I do not get managed to save a 16/24-bit bitmap. There are no problems with 8-bit images but despite of all documentation I have read I was not able to save a 16/24-bit bitmap. I already know the Visual C++ article concerning this topic but somehow it does not work. Can anyone simply send a working sample of how to save a 16 or 24-bit bitmap ? I would be very thankful since I have tried to solve this problem for almost two weeks now.
0
Comment
Question by:ClausLeonhardt
1 Comment
 
LVL 3

Accepted Solution

by:
brosenb0 earned 70 total points
ID: 1322094
What you need to do is create a Device Independent Bitmap (DIB) from your Bitmap and then save this to a file.  This way custom palette information is saved with the bitmap image.  Examples of how to create and save a DIB may be found at www.codeguru.com/bitmap.

In particular look at the the article by Jorge Lodos about the Encapsulated DIB API.  This class contains all the code necessary to load and save DIBS, create the DIB's palette and paint the DIB.  It can easily be extended to allow the DIB to be loaded from a resource contained within the application.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Process filename extension 3 209
Detect CR LF to each line 12 176
while loop over for loop 7 116
difference between String.subString() and String.subSequence() 6 273
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

730 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