⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tififd.h

📁 《精通 vc++ 图像编程》的源代码
💻 H
字号:
// TifIFD.h: interface for the CTifIFD class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TIFIFD_H__48A36A65_0A10_11D3_9481_000021003EA5__INCLUDED_)
#define AFX_TIFIFD_H__48A36A65_0A10_11D3_9481_000021003EA5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "TifHeader.h"
#include "Dib.h"

class CTifIFD  
{
public:
	CTifIFD();
	virtual ~CTifIFD();

private:	// members
	// --- used in ProcessLine() 
	LPBYTE m_lpFaxline;		// array of dest_width
	int	m_lnIndex;			// index to byte in array
	int m_lnThisbit;		// unused bits in byte 
	int m_lnRow;			// count of lines printed
	int m_lnLastSaveByte;	// save last significant char
	int	m_lnFaxBytes;		// output raster line
	int m_lnSliceBytes;		// number of bytes in a slice
	int m_ln2DIndex;		// index to byte in 2-D array
	int m_ln2DBit;			// unused bits in byte 2-D array

public:	
	/*Output:
		Purpose:			Out put decode bit to buffer.
		Parameter passed:	DEVPARMS *device-----Indicates dest mode will
							be output.
							unsigned char *our_line
							int our_row
							int lsb

	InitDecoding:
		Purpose:			Initialize parameters and alloc memory.
		Parameter passed:	None.
		Value returned:		Nonzero if success, else return 0;

	ProcessLine:
		Purpose:			To compose and Output decoded scan lines. At the
							define of this function there was detail msg.
		Parameter passed:	DEVPARMS *device-----pointer to DEVPARMS structure (see decode.h)
							int iRunlength:integer value of run length.
		Value returned:		integer 0 for failure, 1 for success.

	UnpackAsDib:
		Purpose:			Unpack a tiff file to a dib object.
		Parameter passed:	none
		Value returned:		memory handle of DIB block */
	BOOL Output(DEVPARMS *device, unsigned char *our_line,int our_row,int lsb);
	BOOL InitDecoding();
	int ProcessLine (DEVPARMS *device,int iRunlength);
	HDIB UnpackAsDib();
	
	int VerticalScale(DEVPARMS *device,long int count);
	int HorizScale(DEVPARMS *device,long int run);

	BOOL VertFlipBuf(BYTE* inbuf, UINT widthBytes, UINT height);
	void FreeOutImageMem();
	void FreeMem();
	BOOL LoadIFD(HANDLE hFile,WORD wByteOrderFlag);
	
	// members
public:
	long m_lVRes;
	long m_lHRes;
	long m_lOldVRes;
	long m_lOldHRes;

	long m_lImgWidth;	// this is the saved image size
	long m_lImgHeight;	
	
	TIFFMARK* m_pEntry;

	OUTPUTIMAGE m_outImage;
	TIFFIMAGE m_image;
};

#endif // !defined(AFX_TIFIFD_H__48A36A65_0A10_11D3_9481_000021003EA5__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -