ObjReader Community

Discussion => Post Your Questions & Comments Here => Topic started by: James Fuller on May 14, 2017, 11:58:51 am

Title: gdi assistance
Post by: James Fuller on May 14, 2017, 11:58:51 am
Patrice,
  I have 1920x1080 png files where I want just the upper right corner at:
1140,121
1845,463

I loaded it into paint to determine the coordinates.

I want to create a new file with just this part of the image.
How would I approach this as I have very poor graphics knowledge.
The output file can be any format but I would also need how to load and display.

I do have your gdi flat file include.

Thank you,
  James
Title: Re: gdi assistance
Post by: Patrice Terrier on May 14, 2017, 01:51:13 pm
James--

For GDI32 the API to use is BitBlt or StrechBlt.
(return a valid bitmap handle)

For GDIPLUS the API to use is GdipCloneBitmapAreaI
(return a GDIPLUS image handle)

For GDImage the API to use is ZI_CropBitmap
(return always a 32-bit bitmap handle)