The MASM Forum

General => The Campus => Topic started by: ragdog on November 30, 2015, 12:09:45 AM

Title: Gdi++ combine images
Post by: ragdog on November 30, 2015, 12:09:45 AM
Hello

I Search a Tutorial about gdi++ or code to combine 3 images to a one.

Load images with GdipLoadImageFromFile and draw it on a dc (GdipDrawImageRectI)
now need i an example to combine it 3 images to a one to draw it on dc.

example this my DC

(http://fs5.directupload.net/images/151129/6yk7mawb.png)

Greets,
Raggy
Title: Re: Gdi++ combine images
Post by: TouEnMasm on November 30, 2015, 01:14:04 AM
Do it,there is further samples in gdi+ in this forum,32 or 64 bits with images.
Title: Re: Gdi++ combine images
Post by: ragdog on November 30, 2015, 01:20:57 AM
Yes i have first look on this board and examples but not anything found
Then hav i search with google for cpp codes
Title: Re: Gdi++ combine images
Post by: qWord on November 30, 2015, 01:43:02 AM
A simple example in the attachment.
Remarks that the DrawImage*-Functions are (for whatever reason) slow and not recommendable for fast animations (in this case I would suggest to switch to Direct2D or DX).

regards,
qWord
Title: Re: Gdi++ combine images
Post by: ragdog on November 30, 2015, 02:02:28 AM
Hello

Thanks qWord for the collection :t

I have solved it is easier as i thought


invoke GdipDrawImageRectI,graphics, pImage, 4, 4,100,100
invoke GdipDrawImageRectI,graphics, pImage2, 40, 40,100,100