ReactOS  0.4.12-dev-57-g7050ac4
ATL::CImage::COMMON Struct Reference

#include <atlimage.h>

Collaboration diagram for ATL::CImage::COMMON:

Public Types

typedef Gdiplus::GpStatus St
 
typedef Gdiplus::ImageCodecInfo ICI
 
typedef Gdiplus::GpBitmap Bm
 
typedef Gdiplus::EncoderParameters EncParams
 
typedef Gdiplus::GpImage Im
 
typedef Gdiplus::ARGB ARGB
 
typedef HBITMAP HBM
 
typedef Gdiplus::GdiplusStartupInput GSI
 
typedef Gdiplus::GdiplusStartupOutput GSO
 
typedef St(WINAPISTARTUP) (ULONG_PTR *, const GSI *, GSO *)
 
typedef void(WINAPISHUTDOWN) (ULONG_PTR)
 
typedef St(APIGETIMAGEENCODERSSIZE) (UINT *, UINT *)
 
typedef St(APIGETIMAGEENCODERS) (UINT, UINT, ICI *)
 
typedef St(APICREATEBITMAPFROMFILE) (CST WCHAR *, Bm **)
 
typedef St(APICREATEHBITMAPFROMBITMAP) (Bm *, HBM *, ARGB)
 
typedef St(APICREATEBITMAPFROMSTREAM) (IStream *, Bm **)
 
typedef St(APICREATEBITMAPFROMHBITMAP) (HBM, HPALETTE, Bm **)
 
typedef St(APISAVEIMAGETOSTREAM) (Im *, IStream *, CST CLSID *, CST EncParams *)
 
typedef St(APISAVEIMAGETOFILE) (Im *, CST WCHAR *, CST CLSID *, CST EncParams *)
 
typedef St(APIDISPOSEIMAGE) (Im *)
 

Public Member Functions

 COMMON ()
 
 ~COMMON ()
 
ULONG AddRef ()
 
ULONG Release ()
 
template<typename TYPE >
TYPE AddrOf (const char *name)
 
HINSTANCE LoadLib ()
 
void FreeLib ()
 

Public Attributes

int count
 
HINSTANCE hinstGdiPlus
 
ULONG_PTR gdiplusToken
 
STARTUP Startup
 
SHUTDOWN Shutdown
 
GETIMAGEENCODERSSIZE GetImageEncodersSize
 
GETIMAGEENCODERS GetImageEncoders
 
CREATEBITMAPFROMFILE CreateBitmapFromFile
 
CREATEHBITMAPFROMBITMAP CreateHBITMAPFromBitmap
 
CREATEBITMAPFROMSTREAM CreateBitmapFromStream
 
CREATEBITMAPFROMHBITMAP CreateBitmapFromHBITMAP
 
SAVEIMAGETOSTREAM SaveImageToStream
 
SAVEIMAGETOFILE SaveImageToFile
 
DISPOSEIMAGE DisposeImage
 

Detailed Description

Definition at line 842 of file atlimage.h.

Member Typedef Documentation

◆ ARGB

typedef Gdiplus::ARGB ATL::CImage::COMMON::ARGB

Definition at line 850 of file atlimage.h.

◆ Bm

Definition at line 847 of file atlimage.h.

◆ CREATEBITMAPFROMFILE

typedef St(API * ATL::CImage::COMMON::CREATEBITMAPFROMFILE) (CST WCHAR *, Bm **)

Definition at line 864 of file atlimage.h.

◆ CREATEBITMAPFROMHBITMAP

typedef St(API * ATL::CImage::COMMON::CREATEBITMAPFROMHBITMAP) (HBM, HPALETTE, Bm **)

Definition at line 867 of file atlimage.h.

◆ CREATEBITMAPFROMSTREAM

typedef St(API * ATL::CImage::COMMON::CREATEBITMAPFROMSTREAM) (IStream *, Bm **)

Definition at line 866 of file atlimage.h.

◆ CREATEHBITMAPFROMBITMAP

typedef St(API * ATL::CImage::COMMON::CREATEHBITMAPFROMBITMAP) (Bm *, HBM *, ARGB)

Definition at line 865 of file atlimage.h.

◆ DISPOSEIMAGE

typedef St(API * ATL::CImage::COMMON::DISPOSEIMAGE) (Im *)

Definition at line 872 of file atlimage.h.

◆ EncParams

◆ GETIMAGEENCODERS

typedef St(API * ATL::CImage::COMMON::GETIMAGEENCODERS) (UINT, UINT, ICI *)

Definition at line 863 of file atlimage.h.

◆ GETIMAGEENCODERSSIZE

typedef St(API * ATL::CImage::COMMON::GETIMAGEENCODERSSIZE) (UINT *, UINT *)

Definition at line 862 of file atlimage.h.

◆ GSI

typedef Gdiplus::GdiplusStartupInput ATL::CImage::COMMON::GSI

Definition at line 852 of file atlimage.h.

◆ GSO

typedef Gdiplus::GdiplusStartupOutput ATL::CImage::COMMON::GSO

Definition at line 853 of file atlimage.h.

◆ HBM

Definition at line 851 of file atlimage.h.

◆ ICI

Definition at line 846 of file atlimage.h.

◆ Im

Definition at line 849 of file atlimage.h.

◆ SAVEIMAGETOFILE

typedef St(API * ATL::CImage::COMMON::SAVEIMAGETOFILE) (Im *, CST WCHAR *, CST CLSID *, CST EncParams *)

Definition at line 870 of file atlimage.h.

◆ SAVEIMAGETOSTREAM

typedef St(API * ATL::CImage::COMMON::SAVEIMAGETOSTREAM) (Im *, IStream *, CST CLSID *, CST EncParams *)

Definition at line 868 of file atlimage.h.

◆ SHUTDOWN

typedef void(WINAPI * ATL::CImage::COMMON::SHUTDOWN) (ULONG_PTR)

Definition at line 861 of file atlimage.h.

◆ St

Definition at line 845 of file atlimage.h.

◆ STARTUP

typedef St(WINAPI * ATL::CImage::COMMON::STARTUP) (ULONG_PTR *, const GSI *, GSO *)

Definition at line 860 of file atlimage.h.

Constructor & Destructor Documentation

◆ COMMON()

ATL::CImage::COMMON::COMMON ( )
inline

Definition at line 894 of file atlimage.h.

895  {
896  count = 0;
897  hinstGdiPlus = NULL;
898  Startup = NULL;
899  Shutdown = NULL;
908  DisposeImage = NULL;
909  }
GLuint GLuint GLsizei count
Definition: gl.h:1545
GETIMAGEENCODERSSIZE GetImageEncodersSize
Definition: atlimage.h:884
SHUTDOWN Shutdown
Definition: atlimage.h:883
CREATEBITMAPFROMSTREAM CreateBitmapFromStream
Definition: atlimage.h:888
HINSTANCE hinstGdiPlus
Definition: atlimage.h:878
CREATEBITMAPFROMFILE CreateBitmapFromFile
Definition: atlimage.h:886
DISPOSEIMAGE DisposeImage
Definition: atlimage.h:892
smooth NULL
Definition: ftsmooth.c:416
GETIMAGEENCODERS GetImageEncoders
Definition: atlimage.h:885
SAVEIMAGETOSTREAM SaveImageToStream
Definition: atlimage.h:890
SAVEIMAGETOFILE SaveImageToFile
Definition: atlimage.h:891
CREATEBITMAPFROMHBITMAP CreateBitmapFromHBITMAP
Definition: atlimage.h:889
CREATEHBITMAPFROMBITMAP CreateHBITMAPFromBitmap
Definition: atlimage.h:887

◆ ~COMMON()

ATL::CImage::COMMON::~COMMON ( )
inline

Definition at line 910 of file atlimage.h.

911  {
912  FreeLib();
913  }

Member Function Documentation

◆ AddRef()

ULONG ATL::CImage::COMMON::AddRef ( void  )
inline

Definition at line 915 of file atlimage.h.

916  {
917  return ++count;
918  }

◆ AddrOf()

template<typename TYPE >
TYPE ATL::CImage::COMMON::AddrOf ( const char name)
inline

Definition at line 926 of file atlimage.h.

927  {
929  return reinterpret_cast<TYPE>(proc);
930  }
HINSTANCE hinstGdiPlus
Definition: atlimage.h:878
static HANDLE proc()
Definition: pdb.c:31
TYPE
Definition: eventcreate.c:651
Definition: name.c:36
#define GetProcAddress(x, y)
Definition: compat.h:410
int(* FARPROC)()
Definition: compat.h:28

◆ FreeLib()

void ATL::CImage::COMMON::FreeLib ( )
inline

Definition at line 966 of file atlimage.h.

967  {
968  if (hinstGdiPlus)
969  {
971 
972  Startup = NULL;
973  Shutdown = NULL;
982  DisposeImage = NULL;
984  hinstGdiPlus = NULL;
985  }
986  }
GETIMAGEENCODERSSIZE GetImageEncodersSize
Definition: atlimage.h:884
SHUTDOWN Shutdown
Definition: atlimage.h:883
CREATEBITMAPFROMSTREAM CreateBitmapFromStream
Definition: atlimage.h:888
HINSTANCE hinstGdiPlus
Definition: atlimage.h:878
CREATEBITMAPFROMFILE CreateBitmapFromFile
Definition: atlimage.h:886
DISPOSEIMAGE DisposeImage
Definition: atlimage.h:892
smooth NULL
Definition: ftsmooth.c:416
GETIMAGEENCODERS GetImageEncoders
Definition: atlimage.h:885
#define FreeLibrary(x)
Definition: compat.h:405
SAVEIMAGETOSTREAM SaveImageToStream
Definition: atlimage.h:890
ULONG_PTR gdiplusToken
Definition: atlimage.h:879
SAVEIMAGETOFILE SaveImageToFile
Definition: atlimage.h:891
CREATEBITMAPFROMHBITMAP CreateBitmapFromHBITMAP
Definition: atlimage.h:889
CREATEHBITMAPFROMBITMAP CreateHBITMAPFromBitmap
Definition: atlimage.h:887

◆ LoadLib()

HINSTANCE ATL::CImage::COMMON::LoadLib ( )
inline

Definition at line 932 of file atlimage.h.

Referenced by ATL::CImage::CImage().

933  {
934  if (hinstGdiPlus)
935  return hinstGdiPlus;
936 
937  hinstGdiPlus = ::LoadLibraryA("gdiplus.dll");
938 
939  // get procedure addresses from the DLL
940  Startup = AddrOf<STARTUP>("GdiplusStartup");
941  Shutdown = AddrOf<SHUTDOWN>("GdiplusShutdown");
943  AddrOf<GETIMAGEENCODERSSIZE>("GdipGetImageEncodersSize");
944  GetImageEncoders = AddrOf<GETIMAGEENCODERS>("GdipGetImageEncoders");
946  AddrOf<CREATEBITMAPFROMFILE>("GdipCreateBitmapFromFile");
948  AddrOf<CREATEHBITMAPFROMBITMAP>("GdipCreateHBITMAPFromBitmap");
950  AddrOf<CREATEBITMAPFROMSTREAM>("GdipCreateBitmapFromStream");
952  AddrOf<CREATEBITMAPFROMHBITMAP>("GdipCreateBitmapFromHBITMAP");
954  AddrOf<SAVEIMAGETOSTREAM>("GdipSaveImageToStream");
955  SaveImageToFile = AddrOf<SAVEIMAGETOFILE>("GdipSaveImageToFile");
956  DisposeImage = AddrOf<DISPOSEIMAGE>("GdipDisposeImage");
957 
958  if (hinstGdiPlus && Startup)
959  {
960  Gdiplus::GdiplusStartupInput gdiplusStartupInput;
961  Startup(&gdiplusToken, &gdiplusStartupInput, NULL);
962  }
963 
964  return hinstGdiPlus;
965  }
GETIMAGEENCODERSSIZE GetImageEncodersSize
Definition: atlimage.h:884
SHUTDOWN Shutdown
Definition: atlimage.h:883
CREATEBITMAPFROMSTREAM CreateBitmapFromStream
Definition: atlimage.h:888
HINSTANCE hinstGdiPlus
Definition: atlimage.h:878
CREATEBITMAPFROMFILE CreateBitmapFromFile
Definition: atlimage.h:886
DISPOSEIMAGE DisposeImage
Definition: atlimage.h:892
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
smooth NULL
Definition: ftsmooth.c:416
GETIMAGEENCODERS GetImageEncoders
Definition: atlimage.h:885
SAVEIMAGETOSTREAM SaveImageToStream
Definition: atlimage.h:890
ULONG_PTR gdiplusToken
Definition: atlimage.h:879
SAVEIMAGETOFILE SaveImageToFile
Definition: atlimage.h:891
CREATEBITMAPFROMHBITMAP CreateBitmapFromHBITMAP
Definition: atlimage.h:889
CREATEHBITMAPFROMBITMAP CreateHBITMAPFromBitmap
Definition: atlimage.h:887

◆ Release()

ULONG ATL::CImage::COMMON::Release ( void  )
inline

Definition at line 919 of file atlimage.h.

Referenced by ATL::CImage::ReleaseGDIPlus().

920  {
921  return --count;
922  }

Member Data Documentation

◆ count

int ATL::CImage::COMMON::count

Definition at line 877 of file atlimage.h.

◆ CreateBitmapFromFile

CREATEBITMAPFROMFILE ATL::CImage::COMMON::CreateBitmapFromFile

Definition at line 886 of file atlimage.h.

Referenced by ATL::CImage::Load().

◆ CreateBitmapFromHBITMAP

CREATEBITMAPFROMHBITMAP ATL::CImage::COMMON::CreateBitmapFromHBITMAP

Definition at line 889 of file atlimage.h.

Referenced by ATL::CImage::Save().

◆ CreateBitmapFromStream

CREATEBITMAPFROMSTREAM ATL::CImage::COMMON::CreateBitmapFromStream

Definition at line 888 of file atlimage.h.

Referenced by ATL::CImage::Load().

◆ CreateHBITMAPFromBitmap

CREATEHBITMAPFROMBITMAP ATL::CImage::COMMON::CreateHBITMAPFromBitmap

Definition at line 887 of file atlimage.h.

Referenced by ATL::CImage::Load().

◆ DisposeImage

DISPOSEIMAGE ATL::CImage::COMMON::DisposeImage

Definition at line 892 of file atlimage.h.

Referenced by ATL::CImage::Load(), and ATL::CImage::Save().

◆ gdiplusToken

ULONG_PTR ATL::CImage::COMMON::gdiplusToken

Definition at line 879 of file atlimage.h.

◆ GetImageEncoders

GETIMAGEENCODERS ATL::CImage::COMMON::GetImageEncoders

Definition at line 885 of file atlimage.h.

Referenced by ATL::CImage::GetEncoderClsid().

◆ GetImageEncodersSize

GETIMAGEENCODERSSIZE ATL::CImage::COMMON::GetImageEncodersSize

Definition at line 884 of file atlimage.h.

Referenced by ATL::CImage::GetEncoderClsid().

◆ hinstGdiPlus

HINSTANCE ATL::CImage::COMMON::hinstGdiPlus

Definition at line 878 of file atlimage.h.

◆ SaveImageToFile

SAVEIMAGETOFILE ATL::CImage::COMMON::SaveImageToFile

Definition at line 891 of file atlimage.h.

Referenced by ATL::CImage::Save().

◆ SaveImageToStream

SAVEIMAGETOSTREAM ATL::CImage::COMMON::SaveImageToStream

Definition at line 890 of file atlimage.h.

Referenced by ATL::CImage::Save().

◆ Shutdown

SHUTDOWN ATL::CImage::COMMON::Shutdown

Definition at line 883 of file atlimage.h.

◆ Startup

STARTUP ATL::CImage::COMMON::Startup

Definition at line 882 of file atlimage.h.


The documentation for this struct was generated from the following file: