Delphi 2010 - Trouble creating blank white image

Discussions about GdPicture.NET usage in non managed applications built in vb6, Delphi, vfp, MFC c++ etc...
Post Reply
gerryw
Posts: 5
Joined: Tue Jan 12, 2010 5:57 am

Delphi 2010 - Trouble creating blank white image

Post by gerryw » Mon Apr 01, 2013 7:51 am

Hi,

I'm trying to create a blank white image in Delphi 2010. The following seems to ignore the background color.

Image := GdPictureImaging1.CreateNewGdPictureImage(250, 250, 24, GdPictureImaging1.ARGB_2(255,255,255));

How can I do this?

Thanks,
-G

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Delphi 2010 - Trouble creating blank white image

Post by SamiKharma » Mon Apr 01, 2013 1:54 pm

Hi,

You are using the wrong CreateNewGdPictureImage overload.
The overload you are using needs a color of type Long, and you are using ARGB_2 which returned a Color object.

Either use CreateGdPictureImage_2 or use ARGBI() with the overload you are using.
For more information on COM overloading functions:
post12438.html#p12438

Hope this helps,
Sami

gerryw
Posts: 5
Joined: Tue Jan 12, 2010 5:57 am

Re: Delphi 2010 - Trouble creating blank white image

Post by gerryw » Mon Apr 01, 2013 6:39 pm

Hi Sami,

Doh... Thanks for pointing that out.

Thanks,
-G

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests