Image format in HBitmap lazarus / 39-Graphics ---------------------------------------------------------------------- wile64 · 2007-05-21 13:38 Hello, How are to store the images in HBitmap of TBitmap? In what format? ---------------------------------------------------------------------- antonio · 2007-05-21 17:18 You create a bitmap (format: bitmap) at run time, set height and width and you can load from file, save to file, etc, or simply draw or write to it. ---------------------------------------------------------------------- wile64 · 2007-05-21 19:13 I can use a bitmap, thank you ! My question is, Which is the format of the data in HBitmap :!: ex : header, Image Data (rgb, bgr, rgba...) ?   :?: ---------------------------------------------------------------------- antonio · 2007-05-21 20:45 I found this link: http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.html , have a look at it. ---------------------------------------------------------------------- wile64 · 2007-05-21 21:22 thank you, I seek information on pointer of data HBITMAP not on the files Bitmap (bmp) ---------------------------------------------------------------------- antonio · 2007-05-21 21:52 You could search on MSDN, http://msdn2.microsoft.com/fr- fr/default.aspx ---------------------------------------------------------------------- Marc · 2007-05-22 08:46 That info will be only for real HBITMAP handles returned by windows. There is no guarantee what so ever that it is compatible with lazarus. A handle is an abstract pointer so some object. How it is internally structured is of no importance to a user of that handle. ---------------------------------------------------------------------- wile64 · 2007-05-22 09:19 How to reach directly the data image in TBitmap ?  :twisted: ---------------------------------------------------------------------- theo · 2007-05-22 09:47 You can access individual Pixels using TLazIntfImage. See http://wiki.lazarus.freepascal.org/Developing_with_Graphics#A_fadi ng_example . ---------------------------------------------------------------------- Marc · 2007-05-22 09:47 What data do you mean ? ---------------------------------------------------------------------- wile64 · 2007-05-22 10:00 it seems to me: an image is to charge by the SetHandles procedure in FHandle ---------------------------------------------------------------------- Marc · 2007-05-22 16:17 the Handle of a TBitmap is only a "utility" for the LCL to communicate with the Widgetset. For normal usage you don't need to worry about it (like every other handle) If you want to draw something, create a TBitmap, set its Width/Height and start drawing using a canvas. If you want to load an image, use LoadFrom... functions. If you want a TBitmap to display on a form, put a TImage on a form, and assign its picture property. If you want the RawImagedata, use a TLazIntfImage.GetRawImage This is why I ask what you want to do with the handle. ---------------------------------------------------------------------- wile64 · 2007-06-15 19:16 Thank Marc, In me classes : TFPReaderPCX = class (TFPCustomImageReader) procedure InternalRead  (Stream:TStream; Img:TFPCustomImage); override; Or go my image after on load in Img ? ---------------------------------------------------------------------- Marc · 2007-06-18 08:32 the imagereaders are used by FPImage (or LazIntfImage). For each pixel, FPImage.Setpixel is called. LazIntfImage writes those to memory, which you can retrieve/access using a rawimage. This is internally used by bitmap to load some graphic formats. ---------------------------------------------------------------------- wile64 · 2007-06-18 10:06 Hello Marc, I have to create units of loading of file image pass from there by from TFPCustomImageReader and TFPCustomImagewriter. My question is to know if I can charge of the images more directly ? One can like Delphi with scanline and of being able to reach it for the modifiers. It also seems to to me that the pallets are not to support ? ---------------------------------------------------------------------- felipemdc · 2007-06-18 11:58 Quote from: "wile64"My question is to know if I can charge of the images more directly ? The support for this is only partial. You can use TLazIntfImage as already said. Or, use another graphics component, such as: http://wiki.lazarus.freepascal.org/LazRGBGraphics ---------------------------------------------------------------------- wile64 · 2007-06-20 15:29 Thanks Sekel, I already saw component it LazRGBGraphics but I do not believe that it functions on all the platform. And I prefer to await Graphics32 ! :lol: