2 #include "ImagingDef.h"
36 return (m_Bmp!=
nullptr)?m_Bmp->Width:-1;
47 return (m_Bmp!=
nullptr)?m_Bmp->Height:-1;
60 switch(m_Bmp->PixelFormat)
62 case System::Drawing::Imaging::PixelFormat::Format1bppIndexed:
64 case System::Drawing::Imaging::PixelFormat::Format4bppIndexed:
66 case System::Drawing::Imaging::PixelFormat::Format8bppIndexed:
68 case System::Drawing::Imaging::PixelFormat::Format32bppArgb:
69 case System::Drawing::Imaging::PixelFormat::Format32bppPArgb :
70 case System::Drawing::Imaging::PixelFormat::Format32bppRgb:
82 array<System::Drawing::Color>^
get()
84 return (m_Bmp!=
nullptr)?m_Bmp->Palette->Entries:
gcnew array<System::Drawing::Color>(0);
97 System::Drawing::Imaging::BitmapData^ bmpData = m_Bmp->LockBits(System::Drawing::Rectangle(0,0,m_Bmp->Width,m_Bmp->Height),System::Drawing::Imaging::ImageLockMode::WriteOnly,
99 if(bmpData !=
nullptr)
101 array<Byte>^ byArr =
gcnew array<Byte>(bmpData->Stride*m_Bmp->Height);
102 System::Runtime::InteropServices::Marshal::Copy(bmpData->Scan0,byArr,0,bmpData->Stride*m_Bmp->Height);
103 m_Bmp->UnlockBits(bmpData);
107 return gcnew array<Byte>(0);
118 return (m_Bmp!=
nullptr)?m_Bmp->VerticalResolution:-1;
129 return (m_Bmp!=
nullptr)?m_Bmp->HorizontalResolution:-1;
136 property System::Drawing::Image^
Image
138 System::Drawing::Image^
get()
149 Object^
get(){
return m_Tag;}
150 void set(Object^ value){m_Tag = value;}
156 property System::Drawing::Image^ ScaledImage[float,float]
158 virtual System::Drawing::Image^
get(
float x,
float y)
161 return gcnew System::Drawing::Bitmap(m_Bmp,x*m_Bmp->Width,y*m_Bmp->Height);
174 pageInfo.nWidth =
Width;
175 pageInfo.nHeight =
Height;
189 void Draw(System::Drawing::Graphics^ g,
int x,
int y);
199 void Draw(System::Drawing::Graphics^ g,
float x,
float y,
float width,
float height);
200 bool UpdateImage(array<Byte>^ imgData);
202 System::Drawing::Image^ LoadImage(
int iHeight,
int iWidth,
int iBitDepth,array<Byte>^ pixelData,array<Byte>^ clrTable);
206 System::Drawing::Bitmap^ m_Bmp;
Object^ Tag
Use to get Tag of page.
Definition: Page.h:147
int BitDepth
Use to get BitDepth of page.
Definition: Page.h:54
int HorizontalResolution
Use to get HorizontalResolution of page.
Definition: Page.h:125
int Height
Use to get Height of page.
Definition: Page.h:43
Page(FileFormat^ fileFmt, int iPageNum)
Constructor of a class.
Definition: ImageProcess.h:13
Definition: ImagingDef.h:81
void RotateFlip(RotateFlipType)
Use to rotate or flip the page.
array< Byte >^ RawPixelData
Use to get RawPixelData of page.
Definition: Page.h:91
array< System::Drawing::Color >^ ColorTable
Use to get ColorTable of page.
Definition: Page.h:80
void Draw(System::Drawing::Graphics^ g, int x, int y)
Use to draw page.
int Width
Use to get width of page.
Definition: Page.h:32
int VerticalResolution
Use to get VerticalResolution of page.
Definition: Page.h:114