WXP C++ Library Version 6.74.9
|
This class reads and writes GIF files. More...
#include "../include/GifFile.h"
Public Member Functions | |
GifFile () | |
~GifFile () | |
int | init () |
GifFile (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.
GifFile::GifFile | ( | ) |
Constructor. Initializes class values
References init().
GifFile::~GifFile | ( | ) |
Destuctor.
References close().
GifFile::GifFile | ( | const char * | filename, |
int | raccess | ||
) |
Constructor. Opens the GIF file
filename | The file to open |
raccess | The access (FileAttr::READ, FileAttr::WRITE) |
int GifFile::close | ( | ) |
Closes the GIF file
References WXP::File::close().
Referenced by WXP::ImageFile::close(), and ~GifFile().
bool GifFile::isOpen | ( | ) |
int GifFile::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 GifFile(), WXP::ImageFile::open(), and WXP::SatFile::open().
int GifFile::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().
Referenced by WXP::SatFile::read(), and WXP::ImageFile::read().
int GifFile::setInterlace | ( | int | val | ) |
Sets whether the output GIF file is interlaced or not
val | 1=interlaced, 0=not |
int GifFile::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 GifFile::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().
Referenced by WXP::ImageFile::write().