gdiplus: Added GdipCreateBitmapFromFile.
This commit is contained in:
parent
3ea77f5cfd
commit
8726f5ad2d
|
@ -71,7 +71,7 @@
|
|||
@ stub GdipConvertToEmfPlusToStream
|
||||
@ stub GdipCreateAdjustableArrowCap
|
||||
@ stub GdipCreateBitmapFromDirectDrawSurface
|
||||
@ stub GdipCreateBitmapFromFile
|
||||
@ stdcall GdipCreateBitmapFromFile(wstr ptr)
|
||||
@ stub GdipCreateBitmapFromFileICM
|
||||
@ stub GdipCreateBitmapFromGdiDib
|
||||
@ stub GdipCreateBitmapFromGraphics
|
||||
|
|
|
@ -229,6 +229,28 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
|
|||
return Ok;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR* filename,
|
||||
GpBitmap **bitmap)
|
||||
{
|
||||
GpStatus stat;
|
||||
IStream *stream;
|
||||
|
||||
if(!filename || !bitmap)
|
||||
return InvalidParameter;
|
||||
|
||||
stat = GdipCreateStreamOnFile(filename, GENERIC_READ, &stream);
|
||||
|
||||
if(stat != Ok)
|
||||
return stat;
|
||||
|
||||
stat = GdipCreateBitmapFromStream(stream, bitmap);
|
||||
|
||||
if(!stat)
|
||||
IStream_Release(stream);
|
||||
|
||||
return stat;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
|
||||
PixelFormat format, BYTE* scan0, GpBitmap** bitmap)
|
||||
{
|
||||
|
|
|
@ -167,6 +167,7 @@ GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap*);
|
|||
GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap*,INT,INT,ARGB*);
|
||||
GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap*,GDIPCONST GpRect*,UINT,
|
||||
PixelFormat,BitmapData*);
|
||||
GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR*,GpBitmap**);
|
||||
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT,INT,INT,PixelFormat,BYTE*,
|
||||
GpBitmap**);
|
||||
GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream*,GpBitmap**);
|
||||
|
|
Loading…
Reference in New Issue