1 /* 2 * PROJECT: PAINT for ReactOS 3 * LICENSE: LGPL 4 * FILE: base/applications/mspaint/dib.h 5 * PURPOSE: Some DIB related functions 6 * PROGRAMMERS: Benedikt Freisen 7 */ 8 9 #pragma once 10 11 HBITMAP CreateDIBWithProperties(int width, int height); 12 HBITMAP CreateColorDIB(int width, int height, COLORREF rgb); 13 14 static inline HBITMAP CopyDIBImage(HBITMAP hbm, INT cx = 0, INT cy = 0) 15 { 16 return (HBITMAP)CopyImage(hbm, IMAGE_BITMAP, cx, cy, LR_COPYRETURNORG | LR_CREATEDIBSECTION); 17 } 18 19 int GetDIBWidth(HBITMAP hbm); 20 21 int GetDIBHeight(HBITMAP hbm); 22 23 BOOL SaveDIBToFile(HBITMAP hBitmap, LPTSTR FileName, HDC hDC); 24 25 HBITMAP DoLoadImageFile(HWND hwnd, LPCTSTR name, BOOL fIsMainFile); 26 27 void ShowFileLoadError(LPCTSTR name); 28 29 HBITMAP SetBitmapAndInfo(HBITMAP hBitmap, LPCTSTR name, DWORD dwFileSize, BOOL isFile); 30 31 HBITMAP Rotate90DegreeBlt(HDC hDC1, INT cx, INT cy, BOOL bRight); 32 33 HBITMAP SkewDIB(HDC hDC1, HBITMAP hbm, INT nDegree, BOOL bVertical); 34