Kari,
You have sent me an answer how can I save screen pictures image files in small formats like JPG, PNG.
How can I read such files for the simple windowGDI instead of complicated gdiPlus? I'd like to display them add some more rectangles, polygons and circles to them then save the result.
In general, is it allowed to mix wdowGDi and gdiPlus graphica prdicates for the same rectangle of a window?
-
- VIP Member
- Posts: 215
- Joined: 24 Apr 2007 12:26
Reading and using various image files
TIA, Regards,
Frank Nagy
Frank Nagy
-
- VIP Member
- Posts: 105
- Joined: 28 Apr 2006 12:03
hi, maybe this is usefull, i have used this recently
first i load the image in GdiPlus (dont forget to initialize gdi)
-- then further on i use this to convert this image to normal vpi image
the normal pict should arrive in the Np
first i load the image in GdiPlus (dont forget to initialize gdi)
Code: Select all
trap(_Xpi = gdiplus_native::gdipLoadImageFromFile(Fn, Pict),_,fail),
the normal pict should arrive in the Np
Code: Select all
_Wi = gdiplus_native::gdipGetImageWidth(Pict,Width),
_Hi = gdiplus_native::gdipGetImageHeight(Pict,Height),
Opp = Width * Height, Opp < 900000, % beveiliging
%786432
Pw = vpi::pictOpen(rct(0,0,Width,Height)),
HDC = vpi::winGetNativeGraphicContext(Pw, IsReleaseNeeded),
_ = gdiplus_native::gdipCreateFromHDC(HDC, Graphics),
_Xpaqqq = gdiplus_native::gdipDrawImage(Graphics,Pict,0,0),
Np = vpi::pictClose(Pw),