This class reads and writes GIF files. More...
#include "../include/GifFile.h"
Classes | |
| struct | GifHashNode |
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().
| int GifFile::init | ( | ) |
Initializes the class values
Referenced by 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::SatFile::open(), and WXP::ImageFile::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::DomainTool::decode(), WXP::Strings::equal(), WXP::StrLib::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 | ( | 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().
1.6.1