NO

Author Topic: GdiPlus Library  (Read 31236 times)

JohnF

  • Guest
GdiPlus Library
« Reply #15 on: April 10, 2006, 03:13:12 PM »
Here's a tip when using images with GDI+.

GDI+ Bitmaps and GDI+ Images are interchangeable so if you want to save a HBITMAP to disk as a JPG use something like the following.

(EDIT: By Bitmaps and Images are interchangeable I should qualify that. Interchangeable for API's I have tried.)

Use GpBitmap_FromHBITMAP(HBITMAP hbm, HPALETTE hpal) to convert your HBITMAP to a GDI+ Bitmap then use one of the routines linked to above on my web site. Parameter hpal is NULL for a Device Independent bitmap.

http://www.johnfindlay.plus.com/pellesc/GdiPlus/GdiPlus.htm

You will need to cast the GDI+ Bitmap to GDI+ Image

(GP_IMAGE*)

John

czerny

  • Guest
Re: GdiPlus Library
« Reply #16 on: June 18, 2010, 08:29:53 PM »
Hallo,

I am playing a little with the projects in GdiPlus.zip

The first I looked at was GdiPlusDecoders.

Can you tell me what the file GdiplusImageCodec.c is for and why not call the gdiPlus functions directly?

czerny

JohnF

  • Guest
Re: GdiPlus Library
« Reply #17 on: June 18, 2010, 11:16:52 PM »
Hallo,

I am playing a little with the projects in GdiPlus.zip

The first I looked at was GdiPlusDecoders.

Can you tell me what the file GdiplusImageCodec.c is for and why not call the gdiPlus functions directly?

czerny

It's the way M.S. arranged things.

It's up to you if you want to call the functions directly - I just translated the CPP files into C.

John