Pelles C forum Pelles C forum
News: Version 6.00 released!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 06, 2010, 08:21:53 PM


Login with username, password and session length


Pages: 1 [2]   Go Down
  Print  
Author Topic: GdiPlus Library  (Read 9017 times)
JohnF
Member
*
Offline Offline

Posts: 768


WWW
« 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
Logged
czerny
Member
*
Offline Offline

Posts: 16


« 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
Logged
JohnF
Member
*
Offline Offline

Posts: 768


WWW
« 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
Logged
Pages: 1 [2]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 1.032 seconds with 18 queries.