Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CImageFile Class Reference

#include <ImageFile.h>

Inheritance diagram for CImageFile:

CComObject List of all members.

Public Member Functions

 CImageFile (CImageServices *pService)
virtual ~CImageFile ()
void Clear ()
BOOL LoadFromMemory (LPCTSTR pszType, LPCVOID pData, DWORD nLength, BOOL bScanOnly=FALSE, BOOL bPartialOk=FALSE)
BOOL LoadFromFile (LPCTSTR pszType, HANDLE hFile, DWORD nLength, BOOL bScanOnly=FALSE, BOOL bPartialOk=FALSE)
BOOL LoadFromFile (LPCTSTR pszFile, BOOL bScanOnly=FALSE, BOOL bPartialOk=FALSE)
BOOL LoadFromResource (HINSTANCE hInstance, UINT nResourceID, LPCTSTR pszType, BOOL bScanOnly=FALSE, BOOL bPartialOk=FALSE)
BOOL SaveToMemory (LPCTSTR pszType, int nQuality, LPBYTE *ppBuffer, DWORD *pnLength)
BOOL SaveToFile (LPCTSTR pszType, int nQuality, HANDLE hFile, DWORD *pnLength=NULL)
BOOL SaveToFile (LPCTSTR pszFile, int nQuality)
DWORD GetSerialSize () const
void Serialize (CArchive &ar)
HBITMAP CreateBitmap (HDC hUseDC=0)
BOOL Resample (int nNewWidth, int nNewHeight)
BOOL FastResample (int nNewWidth, int nNewHeight)
BOOL EnsureRGB (COLORREF crBack=0xFFFFFFFF)
BOOL MonoToRGB ()
BOOL AlphaToRGB (COLORREF crBack)
BOOL SwapRGB ()

Public Attributes

BOOL m_bScanned
int m_nWidth
int m_nHeight
int m_nComponents
BOOL m_bLoaded
LPBYTE m_pImage

Protected Attributes

CImageServicesm_pService

Constructor & Destructor Documentation

CImageFile::CImageFile CImageServices pService  ) 
 

Definition at line 45 of file ImageFile.cpp.

References NULL.

CImageFile::~CImageFile  )  [virtual]
 

Definition at line 56 of file ImageFile.cpp.

References Clear().


Member Function Documentation

BOOL CImageFile::AlphaToRGB COLORREF  crBack  ) 
 

Definition at line 549 of file ImageFile.cpp.

References m_bLoaded, m_nComponents, m_nHeight, m_nWidth, and m_pImage.

Referenced by EnsureRGB().

void CImageFile::Clear  ) 
 

Definition at line 64 of file ImageFile.cpp.

References m_bLoaded, m_bScanned, m_nComponents, m_nHeight, m_nWidth, m_pImage, and NULL.

Referenced by CImageServices::PostLoad(), Serialize(), and ~CImageFile().

HBITMAP CImageFile::CreateBitmap HDC  hUseDC = 0  ) 
 

Definition at line 227 of file ImageFile.cpp.

References asm_m_nWidth, m_bLoaded, m_nComponents, m_nHeight, m_nWidth, m_pImage, and NULL.

Referenced by CSkin::LoadBitmap(), CImageServices::LoadBitmap(), CBrowseProfileCtrl::LoadDefaultHead(), CBrowseProfileCtrl::OnHeadPacket(), CSearchDetailPanel::OnPreviewLoaded(), CLibraryTipCtrl::OnRun(), CLibraryThumbView::OnRun(), CLibraryMetaPanel::OnRun(), and CAvatarProfilePage::PrepareImage().

BOOL CImageFile::EnsureRGB COLORREF  crBack = 0xFFFFFFFF  ) 
 

Definition at line 483 of file ImageFile.cpp.

References AlphaToRGB(), m_bLoaded, m_nComponents, m_nHeight, m_nWidth, and MonoToRGB().

Referenced by CSkin::LoadBitmap(), CImageServices::LoadBitmap(), CBrowseProfileCtrl::LoadDefaultHead(), CEmoticons::LoadTrillian(), CBrowseProfileCtrl::OnHeadPacket(), CLibraryTipCtrl::OnRun(), CLibraryThumbView::OnRun(), CLibraryMetaPanel::OnRun(), CAvatarProfilePage::PrepareImage(), and CUploadTransferHTTP::RequestPreview().

BOOL CImageFile::FastResample int  nNewWidth,
int  nNewHeight
 

Definition at line 438 of file ImageFile.cpp.

References m_bLoaded, m_nComponents, m_nHeight, m_nWidth, and m_pImage.

DWORD CImageFile::GetSerialSize  )  const
 

Definition at line 168 of file ImageFile.cpp.

References m_bLoaded, m_nComponents, m_nHeight, and m_nWidth.

Referenced by CThumbCache::Store().

BOOL CImageFile::LoadFromFile LPCTSTR  pszFile,
BOOL  bScanOnly = FALSE,
BOOL  bPartialOk = FALSE
 

Definition at line 89 of file ImageFile.cpp.

References CImageServices::LoadFromFile(), m_pService, and NULL.

BOOL CImageFile::LoadFromFile LPCTSTR  pszType,
HANDLE  hFile,
DWORD  nLength,
BOOL  bScanOnly = FALSE,
BOOL  bPartialOk = FALSE
 

Definition at line 84 of file ImageFile.cpp.

References CImageServices::LoadFromFile(), and m_pService.

Referenced by CSkin::LoadBitmap(), CBrowseProfileCtrl::LoadDefaultHead(), CEmoticons::LoadTrillian(), CLibraryTipCtrl::OnRun(), CLibraryThumbView::OnRun(), CLibraryMetaPanel::OnRun(), CAvatarProfilePage::PrepareImage(), and CUploadTransferHTTP::RequestPreview().

BOOL CImageFile::LoadFromMemory LPCTSTR  pszType,
LPCVOID  pData,
DWORD  nLength,
BOOL  bScanOnly = FALSE,
BOOL  bPartialOk = FALSE
 

Definition at line 79 of file ImageFile.cpp.

References CImageServices::LoadFromMemory(), and m_pService.

Referenced by CSearchDetailPanel::DrawThumbnail(), CBrowseProfileCtrl::OnHeadPacket(), CSearchDetailPanel::OnRun(), and CSearchDetailPanel::Update().

BOOL CImageFile::LoadFromResource HINSTANCE  hInstance,
UINT  nResourceID,
LPCTSTR  pszType,
BOOL  bScanOnly = FALSE,
BOOL  bPartialOk = FALSE
 

Definition at line 103 of file ImageFile.cpp.

References CImageServices::LoadFromMemory(), m_pService, NULL, RT_JPEG, and RT_PNG.

Referenced by CSkin::LoadBitmap(), and CImageServices::LoadBitmap().

BOOL CImageFile::MonoToRGB  ) 
 

Definition at line 507 of file ImageFile.cpp.

References m_bLoaded, m_nComponents, m_nHeight, m_nWidth, and m_pImage.

Referenced by EnsureRGB().

BOOL CImageFile::Resample int  nNewWidth,
int  nNewHeight
 

Definition at line 319 of file ImageFile.cpp.

References m_bLoaded, m_nComponents, m_nHeight, m_nWidth, and m_pImage.

Referenced by CBrowseProfileCtrl::LoadDefaultHead(), CBrowseProfileCtrl::OnHeadPacket(), CSearchDetailPanel::OnPreviewLoaded(), CLibraryTipCtrl::OnRun(), CLibraryThumbView::OnRun(), CLibraryMetaPanel::OnRun(), CAvatarProfilePage::PrepareImage(), and CUploadTransferHTTP::RequestPreview().

BOOL CImageFile::SaveToFile LPCTSTR  pszFile,
int  nQuality
 

Definition at line 149 of file ImageFile.cpp.

References m_pService, NULL, and CImageServices::SaveToFile().

BOOL CImageFile::SaveToFile LPCTSTR  pszType,
int  nQuality,
HANDLE  hFile,
DWORD *  pnLength = NULL
 

Definition at line 144 of file ImageFile.cpp.

References m_pService, and CImageServices::SaveToFile().

BOOL CImageFile::SaveToMemory LPCTSTR  pszType,
int  nQuality,
LPBYTE *  ppBuffer,
DWORD *  pnLength
 

Definition at line 139 of file ImageFile.cpp.

References m_pService, and CImageServices::SaveToMemory().

Referenced by CUploadTransferHTTP::RequestPreview().

void CImageFile::Serialize CArchive &  ar  ) 
 

Definition at line 179 of file ImageFile.cpp.

References Clear(), m_bLoaded, m_nComponents, m_nHeight, m_nWidth, and m_pImage.

Referenced by CThumbCache::Load(), and CThumbCache::Store().

BOOL CImageFile::SwapRGB  ) 
 

Definition at line 611 of file ImageFile.cpp.

References m_bLoaded, m_nComponents, m_nHeight, m_nWidth, and m_pImage.

Referenced by CEmoticons::LoadTrillian().


Member Data Documentation

BOOL CImageFile::m_bLoaded
 

Definition at line 45 of file ImageFile.h.

Referenced by CEmoticons::AddEmoticon(), AlphaToRGB(), Clear(), CreateBitmap(), EnsureRGB(), FastResample(), GetSerialSize(), MonoToRGB(), CImageServices::PostLoad(), Resample(), Serialize(), and SwapRGB().

BOOL CImageFile::m_bScanned
 

Definition at line 40 of file ImageFile.h.

Referenced by Clear(), and CImageServices::PostLoad().

int CImageFile::m_nComponents
 

Definition at line 43 of file ImageFile.h.

Referenced by CEmoticons::AddEmoticon(), AlphaToRGB(), Clear(), CreateBitmap(), EnsureRGB(), FastResample(), GetSerialSize(), CImageServices::ImageToArray(), MonoToRGB(), CImageServices::PostLoad(), Resample(), Serialize(), and SwapRGB().

int CImageFile::m_nHeight
 

Definition at line 42 of file ImageFile.h.

Referenced by CEmoticons::AddEmoticon(), AlphaToRGB(), Clear(), CreateBitmap(), EnsureRGB(), FastResample(), GetSerialSize(), CImageServices::ImageToArray(), MonoToRGB(), CSearchDetailPanel::OnPreviewLoaded(), CLibraryTipCtrl::OnRun(), CLibraryThumbView::OnRun(), CLibraryMetaPanel::OnRun(), CImageServices::PostLoad(), CUploadTransferHTTP::RequestPreview(), Resample(), Serialize(), and SwapRGB().

int CImageFile::m_nWidth
 

Definition at line 41 of file ImageFile.h.

Referenced by CEmoticons::AddEmoticon(), AlphaToRGB(), Clear(), CreateBitmap(), EnsureRGB(), FastResample(), GetSerialSize(), CImageServices::ImageToArray(), MonoToRGB(), CSearchDetailPanel::OnPreviewLoaded(), CLibraryTipCtrl::OnRun(), CLibraryThumbView::OnRun(), CLibraryMetaPanel::OnRun(), CImageServices::PostLoad(), CUploadTransferHTTP::RequestPreview(), Resample(), Serialize(), and SwapRGB().

LPBYTE CImageFile::m_pImage
 

Definition at line 46 of file ImageFile.h.

Referenced by CEmoticons::AddEmoticon(), AlphaToRGB(), Clear(), CreateBitmap(), FastResample(), CImageServices::ImageToArray(), CEmoticons::LoadTrillian(), MonoToRGB(), CImageServices::PostLoad(), Resample(), Serialize(), and SwapRGB().

CImageServices* CImageFile::m_pService [protected]
 

Definition at line 38 of file ImageFile.h.

Referenced by LoadFromFile(), LoadFromMemory(), LoadFromResource(), SaveToFile(), and SaveToMemory().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:08 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2