WXP C++ Library Version 6.74.9
|
This class reads and writes GIF files. More...
#include "../include/LZWComp.h"
Public Member Functions | |
LZWComp () | |
~LZWComp () | |
int | init () |
LZWComp (const char *filename, int access) | |
int | open (const char *filename, int access) |
bool | isOpen () |
int | close () |
int | setInterlace (int val) |
int | read (Image &image) |
int | write (Image &image) |
int | write (const char *file) |
This class reads and writes GIF files.
LZWComp::LZWComp | ( | ) |
Constructor. Initializes class values
References init().
LZWComp::~LZWComp | ( | ) |
Destuctor.
References close().
LZWComp::LZWComp | ( | const char * | filename, |
int | raccess | ||
) |
Constructor. Opens the GIF file
filename | The file to open |
raccess | The access (FileAttr::READ, FileAttr::WRITE) |
int LZWComp::close | ( | ) |
bool LZWComp::isOpen | ( | ) |
Returns if file is open or not
int LZWComp::open | ( | const char * | filename, |
int | raccess | ||
) |
Opens the GIF file
filename | The file to open |
raccess | The access (FileAttr::READ, FileAttr::WRITE) |
References WXP::File::isOpen(), WXP::File::open(), WXP::FileAttr::READ, and WXP::FileAttr::WRITE.
Referenced by LZWComp().
int LZWComp::read | ( | Image & | image | ) |
Reads in a GIF file and outputs data into an Image class
image | Output image class |
References WXP::Image::allocColors(), WXP::Image::allocData(), WXP::DateTool::decode(), WXP::DomainTool::decode(), WXP::StrLib::equal(), WXP::Strings::equal(), WXP::Strings::getNum(), WXP::Strings::getString(), WXP::Image::init(), WXP::Wxp::outDebug(), WXP::File::read(), WXP::FileAttr::READ, WXP::Image::setBlu(), WXP::Image::setGrn(), WXP::Image::setPixel(), and WXP::Image::setRed().
int LZWComp::setInterlace | ( | int | val | ) |
Sets whether the output GIF file is interlaced or not
val | 1=interlaced, 0=not |
int LZWComp::write | ( | const char * | filename | ) |
Write GIF data from opened file to new file
filename | Output filename |
References WXP::File::close(), WXP::StrLib::equal(), WXP::File::isOpen(), WXP::File::open(), WXP::Wxp::outMessage(), WXP::Wxp::outWarning(), WXP::File::read(), and WXP::File::write().
int LZWComp::write | ( | Image & | image | ) |
Writes an Image to a GIF file
image | Image to write to file |
References WXP::File::close(), WXP::StrLib::copy(), WXP::Image::getVal(), WXP::StrLib::length(), WXP::Const::MISS, WXP::Wxp::outDebug(), WXP::ImageMath::toIndex(), WXP::Domain::toString(), and WXP::File::write().