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

x
?
Solved

BITMAPINFOHEADER

Posted on 2002-06-03
2
Medium Priority
?
574 Views
Last Modified: 2008-02-01
Hello,
How can I get the BITMAPINFOHEADER of the TBitmap?
0
Comment
Question by:libbysharf
[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
2 Comments
 
LVL 2

Accepted Solution

by:
freshman3k earned 200 total points
ID: 7052090
Hello!

The following should work:

Var
Bitmap: TBitmap;
BitmapHeader: pBitmapInfo;
BitmapImage : POINTER;
HeaderSize : DWORD;
ImageSize : DWORD;
Begin
  Bitmap:=TBitMap.Create;
  Bitmap.LoadFromFile('c:\picture.bmp');
 
  GetDIBSizes(Bitmap.Handle, HeaderSize, ImageSize);
  GetMem(BitmapHeader, HeaderSize);
  GetMem(BitmapImage, ImageSize);
 
  GetDIB(Bitmap.Handle,Bitmap.Palette,BitmapHeader^,BitmapImage^);
 {the variable 'BitmapHeader' now contains the header of the bitmap}

  FreeMem(BitmapHeader);
  FreeMem(BitmapImage);
End;

pBitmapInfo is the same as BITMAPINFOHEADER


Hope this helps!
0
 

Author Comment

by:libbysharf
ID: 7053268
Thanks a lot!
Very simple and powerfull!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

618 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