#ifndef _GFile_TIFF_H #define _GFile_TIFF_H #include #include "GFile.h" /* GFile (ie. GImage) decendent for reading TIFF files. * * Written by: Chris Studholme * Last Update: 8-January-2000 * Copyright: GPL (http://www.fsf.org/copyleft/gpl.html) */ class GFile_TIFF : public GFile { protected: TIFF* imagefile; int w,h; public: GFile_TIFF(const char* filename, bool fast=false); // GFile_TIFF(FILE* imagefile); ~GFile_TIFF(); static bool supportsFile(FILE* file); bool isOK() { return (imagefile!=0); } const char* getComments(); int getWidth() { return w; } int getHeight() { return h; } /* width/height of individual pixel */ double getAspectRatio(); /* must have x1getPixel(x1,y1,x2,y2); g = green->getPixel(x1,y1,x2,y2); b = blue->getPixel(x1,y1,x2,y2); } /* must have y1getScanLineHorz(r,x1,y1,x2,y2,npixels); green->getScanLineHorz(g,x1,y1,x2,y2,npixels); blue->getScanLineHorz(b,x1,y1,x2,y2,npixels); } /* must have x1getScanLineVert(r,x1,y1,x2,y2,npixels); green->getScanLineVert(g,x1,y1,x2,y2,npixels); blue->getScanLineVert(b,x1,y1,x2,y2,npixels); } protected: void ReadImage(bool fast=false); }; #endif