ReactOS  0.4.15-dev-1177-g6cb3b62
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 828 of file atlimage.h.

Member Typedef Documentation

◆ ARGB

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

Definition at line 836 of file atlimage.h.

◆ Bm

Definition at line 833 of file atlimage.h.

◆ CREATEBITMAPFROMFILE

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

Definition at line 850 of file atlimage.h.

◆ CREATEBITMAPFROMHBITMAP

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

Definition at line 853 of file atlimage.h.

◆ CREATEBITMAPFROMSTREAM

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

Definition at line 852 of file atlimage.h.

◆ CREATEHBITMAPFROMBITMAP

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

Definition at line 851 of file atlimage.h.

◆ DISPOSEIMAGE

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

Definition at line 858 of file atlimage.h.

◆ EncParams

◆ GETIMAGEENCODERS

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

Definition at line 849 of file atlimage.h.

◆ GETIMAGEENCODERSSIZE

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

Definition at line 848 of file atlimage.h.

◆ GSI

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

Definition at line 838 of file atlimage.h.

◆ GSO

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

Definition at line 839 of file atlimage.h.

◆ HBM

Definition at line 837 of file atlimage.h.

◆ ICI

Definition at line 832 of file atlimage.h.

◆ Im

Definition at line 835 of file atlimage.h.

◆ SAVEIMAGETOFILE

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

Definition at line 856 of file atlimage.h.

◆ SAVEIMAGETOSTREAM

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

Definition at line 854 of file atlimage.h.

◆ SHUTDOWN

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

Definition at line 847 of file atlimage.h.

◆ St

Definition at line 831 of file atlimage.h.

◆ STARTUP

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

Definition at line 846 of file atlimage.h.

Constructor & Destructor Documentation

◆ COMMON()

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

Definition at line 880 of file atlimage.h.

881  {
882  count = 0;
883  hinstGdiPlus = NULL;
884  Startup = NULL;
885  Shutdown = NULL;
894  DisposeImage = NULL;
895  }
GLuint GLuint GLsizei count
Definition: gl.h:1545
GETIMAGEENCODERSSIZE GetImageEncodersSize
Definition: atlimage.h:870
SHUTDOWN Shutdown
Definition: atlimage.h:869
CREATEBITMAPFROMSTREAM CreateBitmapFromStream
Definition: atlimage.h:874
HINSTANCE hinstGdiPlus
Definition: atlimage.h:864
CREATEBITMAPFROMFILE CreateBitmapFromFile
Definition: atlimage.h:872
DISPOSEIMAGE DisposeImage
Definition: atlimage.h:878
smooth NULL
Definition: ftsmooth.c:416
GETIMAGEENCODERS GetImageEncoders
Definition: atlimage.h:871
SAVEIMAGETOSTREAM SaveImageToStream
Definition: atlimage.h:876
SAVEIMAGETOFILE SaveImageToFile
Definition: atlimage.h:877
CREATEBITMAPFROMHBITMAP CreateBitmapFromHBITMAP
Definition: atlimage.h:875
CREATEHBITMAPFROMBITMAP CreateHBITMAPFromBitmap
Definition: atlimage.h:873

◆ ~COMMON()

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

Definition at line 896 of file atlimage.h.

897  {
898  FreeLib();
899  }

Member Function Documentation

◆ AddRef()

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

Definition at line 901 of file atlimage.h.

902  {
903  return ++count;
904  }

◆ AddrOf()

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

Definition at line 912 of file atlimage.h.

913  {
915  return reinterpret_cast<TYPE>(proc);
916  }
HINSTANCE hinstGdiPlus
Definition: atlimage.h:864
static HANDLE proc()
Definition: pdb.c:32
Definition: name.c:38
#define GetProcAddress(x, y)
Definition: compat.h:501
int(* FARPROC)()
Definition: compat.h:36

◆ FreeLib()

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

Definition at line 952 of file atlimage.h.

953  {
954  if (hinstGdiPlus)
955  {
957 
958  Startup = NULL;
959  Shutdown = NULL;
968  DisposeImage = NULL;
970  hinstGdiPlus = NULL;
971  }
972  }
GETIMAGEENCODERSSIZE GetImageEncodersSize
Definition: atlimage.h:870
SHUTDOWN Shutdown
Definition: atlimage.h:869
CREATEBITMAPFROMSTREAM CreateBitmapFromStream
Definition: atlimage.h:874
HINSTANCE hinstGdiPlus
Definition: atlimage.h:864
CREATEBITMAPFROMFILE CreateBitmapFromFile
Definition: atlimage.h:872
DISPOSEIMAGE DisposeImage
Definition: atlimage.h:878
smooth NULL
Definition: ftsmooth.c:416
GETIMAGEENCODERS GetImageEncoders
Definition: atlimage.h:871
#define FreeLibrary(x)
Definition: compat.h:496
SAVEIMAGETOSTREAM SaveImageToStream
Definition: atlimage.h:876
ULONG_PTR gdiplusToken
Definition: atlimage.h:865
SAVEIMAGETOFILE SaveImageToFile
Definition: atlimage.h:877
CREATEBITMAPFROMHBITMAP CreateBitmapFromHBITMAP
Definition: atlimage.h:875
CREATEHBITMAPFROMBITMAP CreateHBITMAPFromBitmap
Definition: atlimage.h:873

Referenced by ~COMMON().

◆ LoadLib()

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

Definition at line 918 of file atlimage.h.

919  {
920  if (hinstGdiPlus)
921  return hinstGdiPlus;
922 
923  hinstGdiPlus = ::LoadLibraryA("gdiplus.dll");
924 
925  // get procedure addresses from the DLL
926  Startup = AddrOf<STARTUP>("GdiplusStartup");
927  Shutdown = AddrOf<SHUTDOWN>("GdiplusShutdown");
929  AddrOf<GETIMAGEENCODERSSIZE>("GdipGetImageEncodersSize");
930  GetImageEncoders = AddrOf<GETIMAGEENCODERS>("GdipGetImageEncoders");
932  AddrOf<CREATEBITMAPFROMFILE>("GdipCreateBitmapFromFile");
934  AddrOf<CREATEHBITMAPFROMBITMAP>("GdipCreateHBITMAPFromBitmap");
936  AddrOf<CREATEBITMAPFROMSTREAM>("GdipCreateBitmapFromStream");
938  AddrOf<CREATEBITMAPFROMHBITMAP>("GdipCreateBitmapFromHBITMAP");
940  AddrOf<SAVEIMAGETOSTREAM>("GdipSaveImageToStream");
941  SaveImageToFile = AddrOf<SAVEIMAGETOFILE>("GdipSaveImageToFile");
942  DisposeImage = AddrOf<DISPOSEIMAGE>("GdipDisposeImage");
943 
944  if (hinstGdiPlus && Startup)
945  {
946  Gdiplus::GdiplusStartupInput gdiplusStartupInput;
948  }
949 
950  return hinstGdiPlus;
951  }
GETIMAGEENCODERSSIZE GetImageEncodersSize
Definition: atlimage.h:870
SHUTDOWN Shutdown
Definition: atlimage.h:869
CREATEBITMAPFROMSTREAM CreateBitmapFromStream
Definition: atlimage.h:874
HINSTANCE hinstGdiPlus
Definition: atlimage.h:864
CREATEBITMAPFROMFILE CreateBitmapFromFile
Definition: atlimage.h:872
DISPOSEIMAGE DisposeImage
Definition: atlimage.h:878
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
smooth NULL
Definition: ftsmooth.c:416
GETIMAGEENCODERS GetImageEncoders
Definition: atlimage.h:871
SAVEIMAGETOSTREAM SaveImageToStream
Definition: atlimage.h:876
ULONG_PTR gdiplusToken
Definition: atlimage.h:865
SAVEIMAGETOFILE SaveImageToFile
Definition: atlimage.h:877
Gdiplus::GdiplusStartupInput gdiplusStartupInput
Definition: winmain.cpp:38
CREATEBITMAPFROMHBITMAP CreateBitmapFromHBITMAP
Definition: atlimage.h:875
CREATEHBITMAPFROMBITMAP CreateHBITMAPFromBitmap
Definition: atlimage.h:873

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

◆ Release()

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

Definition at line 905 of file atlimage.h.

906  {
907  return --count;
908  }

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

Member Data Documentation

◆ count

int ATL::CImage::COMMON::count

Definition at line 863 of file atlimage.h.

Referenced by AddRef(), and Release().

◆ CreateBitmapFromFile

CREATEBITMAPFROMFILE ATL::CImage::COMMON::CreateBitmapFromFile

Definition at line 872 of file atlimage.h.

Referenced by COMMON(), FreeLib(), ATL::CImage::Load(), and LoadLib().

◆ CreateBitmapFromHBITMAP

CREATEBITMAPFROMHBITMAP ATL::CImage::COMMON::CreateBitmapFromHBITMAP

Definition at line 875 of file atlimage.h.

Referenced by COMMON(), FreeLib(), LoadLib(), and ATL::CImage::Save().

◆ CreateBitmapFromStream

CREATEBITMAPFROMSTREAM ATL::CImage::COMMON::CreateBitmapFromStream

Definition at line 874 of file atlimage.h.

Referenced by COMMON(), FreeLib(), ATL::CImage::Load(), and LoadLib().

◆ CreateHBITMAPFromBitmap

CREATEHBITMAPFROMBITMAP ATL::CImage::COMMON::CreateHBITMAPFromBitmap

Definition at line 873 of file atlimage.h.

Referenced by COMMON(), FreeLib(), ATL::CImage::Load(), and LoadLib().

◆ DisposeImage

DISPOSEIMAGE ATL::CImage::COMMON::DisposeImage

Definition at line 878 of file atlimage.h.

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

◆ gdiplusToken

ULONG_PTR ATL::CImage::COMMON::gdiplusToken

Definition at line 865 of file atlimage.h.

Referenced by FreeLib(), and LoadLib().

◆ GetImageEncoders

GETIMAGEENCODERS ATL::CImage::COMMON::GetImageEncoders

Definition at line 871 of file atlimage.h.

Referenced by COMMON(), FreeLib(), ATL::CImage::GetEncoderClsid(), and LoadLib().

◆ GetImageEncodersSize

GETIMAGEENCODERSSIZE ATL::CImage::COMMON::GetImageEncodersSize

Definition at line 870 of file atlimage.h.

Referenced by COMMON(), FreeLib(), ATL::CImage::GetEncoderClsid(), and LoadLib().

◆ hinstGdiPlus

HINSTANCE ATL::CImage::COMMON::hinstGdiPlus

Definition at line 864 of file atlimage.h.

Referenced by AddrOf(), COMMON(), FreeLib(), and LoadLib().

◆ SaveImageToFile

SAVEIMAGETOFILE ATL::CImage::COMMON::SaveImageToFile

Definition at line 877 of file atlimage.h.

Referenced by COMMON(), FreeLib(), LoadLib(), and ATL::CImage::Save().

◆ SaveImageToStream

SAVEIMAGETOSTREAM ATL::CImage::COMMON::SaveImageToStream

Definition at line 876 of file atlimage.h.

Referenced by COMMON(), FreeLib(), LoadLib(), and ATL::CImage::Save().

◆ Shutdown

SHUTDOWN ATL::CImage::COMMON::Shutdown

Definition at line 869 of file atlimage.h.

Referenced by COMMON(), FreeLib(), and LoadLib().

◆ Startup

STARTUP ATL::CImage::COMMON::Startup

Definition at line 868 of file atlimage.h.

Referenced by COMMON(), FreeLib(), and LoadLib().


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