Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Saving of 16/24-bit bitmap

Posted on 1998-09-12
1
Medium Priority
?
476 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
[X]
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
 
LVL 3

Accepted Solution

by:
brosenb0 earned 280 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

636 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