WXP C++ Library Version 6.74.6
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
WXP::ImgWxpFile Class Reference

This class reads and writes image files. More...

#include "../include/ImgWxpFile.h"

Public Types

enum  Type { UNK , IMG , IMGZ }
 

Public Member Functions

 ImgWxpFile ()
 
int setVer (int v)
 
int open (const char *filename, int raccess, int rtype)
 
int open (const char *filename, int raccess)
 
int open (const char *filename)
 
bool isOpen ()
 
int close ()
 
int read (Image &image)
 
int readHeader (Image &image)
 
int readData (Image &image)
 
int read (const char *filename, Image &image)
 
int write (Image &image)
 
int write (const char *filename, int rtype, Image &image)
 

Detailed Description

This class reads and writes image files.

Author
Dan Vietor

Member Enumeration Documentation

◆ Type

Enumerator
UNK 

Unknown type

IMG 

Uncompressed WXP image

IMGZ 

Compressed WXP image

Constructor & Destructor Documentation

◆ ImgWxpFile()

ImgWxpFile::ImgWxpFile ( )

Constructor. Initializes class values

Member Function Documentation

◆ close()

int ImgWxpFile::close ( )

Closes the file

References WXP::File::close().

Referenced by WXP::ImageFile::close(), and read().

◆ isOpen()

bool ImgWxpFile::isOpen ( )

Returns if file is open or not

Returns
True if opened

Referenced by WXP::ImageFile::open().

◆ open() [1/3]

int ImgWxpFile::open ( const char *  filename)

Opens a file for read (unknown type)

Parameters
filenameFile to open

References open(), WXP::FileAttr::READ, and UNK.

◆ open() [2/3]

int ImgWxpFile::open ( const char *  filename,
int  raccess 
)

Opens a file (unknown type)

Parameters
filenameFile to open
raccessFile access (FileAttr::READ, FileAttr::WRITE)

References open(), and UNK.

◆ open() [3/3]

int ImgWxpFile::open ( const char *  filename,
int  raccess,
int  rtype 
)

Opens an image file

Parameters
filenameFile to open
raccessAccess to the file (FileAttr::READ, FileAttr::WRITE)
rtypeType of image file (UNK, IMG, IMGZ, GIF, PNG)

References WXP::File::close(), WXP::StrLib::equal(), IMG, WXP::File::isOpen(), WXP::File::open(), WXP::File::read(), WXP::FileAttr::READ, and WXP::FileAttr::WRITE.

Referenced by open(), WXP::ImageFile::open(), WXP::SatFile::open(), read(), and write().

◆ read() [1/2]

int ImgWxpFile::read ( const char *  filename,
Image image 
)

Opens and reads an image from the file

Parameters
filenameFile to read
Return values
imageImage class to put file data into

References close(), open(), WXP::FileAttr::READ, and read().

◆ read() [2/2]

int ImgWxpFile::read ( Image image)

Reads in a WXP formatted image file

Return values
imageImage class to put satellite image

References WXP::File::isOpen(), readData(), and readHeader().

Referenced by read(), WXP::SatFile::read(), and WXP::ImageFile::read().

◆ readData()

int ImgWxpFile::readData ( Image image)

◆ readHeader()

int ImgWxpFile::readHeader ( Image image)

◆ setVer()

int ImgWxpFile::setVer ( int  v)

Sets the output file version

Parameters
vThe version

Referenced by WXP::ImageFile::setVer().

◆ write() [1/2]

int ImgWxpFile::write ( const char *  filename,
int  rtype,
Image image 
)

Writes an image to file

Parameters
filenameFile to write to
rtypeType of file to write (IMG, IMGZ, GIF, PNG)
imageImage class to write to file

References open(), WXP::FileAttr::WRITE, and write().

◆ write() [2/2]

int ImgWxpFile::write ( Image image)

The documentation for this class was generated from the following files: