Page 1 of 1

Delphi 2010 - Trouble creating blank white image

Posted: Mon Apr 01, 2013 7:51 am
by gerryw
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

Re: Delphi 2010 - Trouble creating blank white image

Posted: Mon Apr 01, 2013 1:54 pm
by SamiKharma
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

Re: Delphi 2010 - Trouble creating blank white image

Posted: Mon Apr 01, 2013 6:39 pm
by gerryw
Hi Sami,

Doh... Thanks for pointing that out.

Thanks,
-G