Author Topic: gdi assistance  (Read 5440 times)

James Fuller

  • Newbie
  • *
  • Posts: 41
gdi assistance
« 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

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: gdi assistance
« Reply #1 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)
« Last Edit: May 14, 2017, 01:57:50 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)