#include <stdlib.h>
#include <ocidl.h>
#include <olectl.h>
#include "ut_string.h"
#include "ut_bytebuf.h"
#include "fg_GraphicRaster.h"
#include "ut_debugmsg.h"
#include "ut_assert.h"
#include "xap_Module.h"
#include "ie_impGraphic_Win32Native.h"
Functions | |
bool | isGDIPlusAvailable () |
UT_Error | GDIconvertGraphic (UT_ByteBuf *pBB, UT_ByteBuf *pBBOut, std::string &mimetype) |
void | shutDownGDIPlus () |
static void | _write_png (png_structp png_ptr, png_bytep data, png_size_t length) |
static void | _write_flush (png_structp) |
static void | CreateBMPFile (HWND, UT_ByteBuf &pBB, PBITMAPINFO pbi, HBITMAP hBMP, HDC hDC) |
static PBITMAPINFO | CreateBitmapInfoStruct (HBITMAP hBmp) |
Variables | |
static IE_SuffixConfidence | IE_ImpGraphicWin32Native_Sniffer__SuffixConfidence [] |
static IE_MimeConfidence | IE_ImpGraphicWin32_Sniffer__MimeConfidence [] |
static void _write_flush | ( | png_structp | ) | [static] |
Referenced by IE_ImpGraphic_Win32Native::Initialize_PNG().
static void _write_png | ( | png_structp | png_ptr, | |
png_bytep | data, | |||
png_size_t | length | |||
) | [static] |
References UT_ByteBuf::append().
Referenced by IE_ImpGraphic_Win32Native::Initialize_PNG().
static PBITMAPINFO CreateBitmapInfoStruct | ( | HBITMAP | hBmp | ) | [static] |
static void CreateBMPFile | ( | HWND | , | |
UT_ByteBuf & | pBB, | |||
PBITMAPINFO | pbi, | |||
HBITMAP | hBMP, | |||
HDC | hDC | |||
) | [static] |
References UT_ByteBuf::append(), and UT_ByteBuf::truncate().
Referenced by IE_ImpGraphic_Win32Native::_convertGraphic().
UT_Error GDIconvertGraphic | ( | UT_ByteBuf * | pBB, | |
UT_ByteBuf * | pBBOut, | |||
std::string & | mimetype | |||
) |
References UT_ByteBuf::append(), gdip_jpeg_encoder_guid, gdip_jpeg_guid, gdip_png_encoder_guid, GdipDisposeImage(), GdipGetImageRawFormat(), GdipLoadImageFromStream(), GdipSaveImageToStream(), UT_ByteBuf::getLength(), UT_ByteBuf::getPointer(), HRESULT(), and UT_ERROR.
Referenced by IE_ImpGraphic_Win32Native::_convertGraphic().
bool isGDIPlusAvailable | ( | ) |
References gdiplusToken, and initGDIPlus().
Referenced by IE_ImpGraphic_Win32Native::_convertGraphic().
void shutDownGDIPlus | ( | ) |
References GdiplusShutdown(), and gdiplusToken.
{ { IE_MIME_MATCH_FULL, "image/bmp", UT_CONFIDENCE_PERFECT }, { IE_MIME_MATCH_FULL, "image/x-emf", UT_CONFIDENCE_PERFECT }, { IE_MIME_MATCH_FULL, "image/gif", UT_CONFIDENCE_PERFECT }, { IE_MIME_MATCH_FULL, "image/x-icon", UT_CONFIDENCE_PERFECT }, { IE_MIME_MATCH_FULL, "image/jpeg", UT_CONFIDENCE_PERFECT }, { IE_MIME_MATCH_FULL, "windows/metafile", UT_CONFIDENCE_PERFECT }, { IE_MIME_MATCH_FULL, "image/x-wmf", UT_CONFIDENCE_PERFECT }, { IE_MIME_MATCH_BOGUS, "", UT_CONFIDENCE_ZILCH } }
{ { "bmp", UT_CONFIDENCE_PERFECT }, { "emf", UT_CONFIDENCE_PERFECT }, { "gif", UT_CONFIDENCE_PERFECT }, { "ico", UT_CONFIDENCE_PERFECT }, { "jpg", UT_CONFIDENCE_PERFECT }, { "jpeg", UT_CONFIDENCE_PERFECT }, { "wmf", UT_CONFIDENCE_PERFECT }, { "", UT_CONFIDENCE_ZILCH } }