Author Topic: gdi assistance  (Read 4457 times)

James Fuller

  • Newbie
  • *
  • Posts: 41
gdi assistance
« on: May 14, 2017, 11:58:51 am »
  I have 1920x1080 png files where I want just the upper right corner at:

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,

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1979
    • zapsolution
Re: gdi assistance
« Reply #1 on: May 14, 2017, 01:51:13 pm »

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)
« Last Edit: May 14, 2017, 01:57:50 pm by Patrice Terrier »
(Always working with the latest Windows version available...)