08-13-2012, 04:16 PM
Hello Gint
Im running code below from a toolbar to capture certain windows.
Macro Macro
I was wondering if we can save the file in other format eg. .jpg by using GDI+ functions?
Only way i could work out so far is create the bitmap file - save bitmap file - convert to jpeg - delete bitmap file.
Can we convert from variable before saving .bmp file or need to save file first?
Thank you.
Im running code below from a toolbar to capture certain windows.
Macro Macro
int hwnd=win
;
RECT r; GetClientRect hwnd &r
POINT p; ClientToScreen hwnd &p
__MemBmp mb
mb.Create(r.right r.bottom 1 p.x p.y)
;
_s="new_img"
if(OpenSaveDialog(1 _s "Image files[]*.bmp[]All Files[]*.*[]" ".bmp"))
,SaveBitmap mb.bm _s
,run _s
I was wondering if we can save the file in other format eg. .jpg by using GDI+ functions?
Only way i could work out so far is create the bitmap file - save bitmap file - convert to jpeg - delete bitmap file.
Can we convert from variable before saving .bmp file or need to save file first?
Thank you.