Changeset 3419 for libpipi


Ignore:
Timestamp:
Apr 21, 2009, 1:57:08 AM (11 years ago)
Author:
Sam Hocevar
Message:

Make sure that the gdiplus codec initialises GdiPlus? before any library
calls are made.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/pipi/codec/gdiplus.cpp

    r3342 r3419  
    8282extern "C" int pipi_save_gdiplus(pipi_image_t *img, const char *name)
    8383{
     84    ULONG_PTR token;
     85    Gdiplus::GdiplusStartupInput input;
     86    Gdiplus::GdiplusStartup(&token, &input, NULL);
     87
    8488    wchar_t const *fmt;
    8589    if(strstr(name, ".gif"))
     
    122126    }
    123127
    124     ULONG_PTR token;
    125     Gdiplus::GdiplusStartupInput input;
    126     Gdiplus::GdiplusStartup(&token, &input, NULL);
    127 
    128128    Gdiplus::Bitmap *b = new Gdiplus::Bitmap(img->w, img->h,
    129129                                             PixelFormat32bppARGB);
Note: See TracChangeset for help on using the changeset viewer.