Browse Source

Cope with disparities between GDI+ versions.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@3077 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 years ago
parent
commit
b090037daf
3 changed files with 5 additions and 5 deletions
  1. +2
    -2
      pipi/codec/gdiplus.cpp
  2. +2
    -2
      win32/gdiplus/include/GdiplusBitmap.h
  3. +1
    -1
      win32/gdiplus/include/GdiplusHeaders.h

+ 2
- 2
pipi/codec/gdiplus.cpp View File

@@ -57,7 +57,7 @@ extern "C" pipi_image_t *pipi_load_gdiplus(const char *name)
Gdiplus::BitmapData bdata;
Gdiplus::Rect rect(0, 0, b->GetWidth(), b->GetHeight());

if(b->LockBits(rect, Gdiplus::ImageLockModeRead,
if(b->LockBits(&rect, Gdiplus::ImageLockModeRead,
PixelFormat32bppARGB, &bdata) != Gdiplus::Ok)
{
delete b;
@@ -129,7 +129,7 @@ extern "C" int pipi_save_gdiplus(pipi_image_t *img, const char *name)
Gdiplus::BitmapData bdata;
Gdiplus::Rect rect(0, 0, img->w, img->h);

if(b->LockBits(rect, (unsigned int)Gdiplus::ImageLockModeWrite,
if(b->LockBits(&rect, (unsigned int)Gdiplus::ImageLockModeWrite,
PixelFormat32bppARGB, &bdata) != Gdiplus::Ok)
{
delete b;


+ 2
- 2
win32/gdiplus/include/GdiplusBitmap.h View File

@@ -935,7 +935,7 @@ inline Bitmap::Bitmap(GpBitmap *nativeBitmap)
inline Status
Bitmap::LockBits(
IN const Rect& rect,
IN const Rect* rect,
IN UINT flags,
IN PixelFormat format,
OUT BitmapData* lockedBitmapData
@@ -943,7 +943,7 @@ Bitmap::LockBits(
{
return SetStatus(DllExports::GdipBitmapLockBits(
static_cast<GpBitmap*>(nativeImage),
&rect,
rect,
flags,
format,
lockedBitmapData));


+ 1
- 1
win32/gdiplus/include/GdiplusHeaders.h View File

@@ -633,7 +633,7 @@ public:
IN REAL height,
IN PixelFormat format);
Status LockBits(IN const Rect& rect,
Status LockBits(IN const Rect* rect,
IN UINT flags,
IN PixelFormat format,
OUT BitmapData* lockedBitmapData);


Loading…
Cancel
Save