JPEG Wrap  0.0.1-2561
C++ JPEG Wrap for IJG's jpeglib
JWDecompress Class Reference

Use JWDecompress to decompress an existing .jpg file to RGB image data. More...

#include <JWDecompress.hpp>

Inheritance diagram for JWDecompress:
Collaboration diagram for JWDecompress:

Public Member Functions

virtual JWDecompressdecompress (void)
 Decompress the given data. More...
 
virtual std::string get_filename (void) const
 The filename used for input (decompress) or output (compress) if set via set_file(). More...
 
virtual JWDecompressset_input_file (const std::string &filename)
 Set the jpeg input file. More...
 
virtual JWDecompressset_input_file (FILE *f)
 Set the jpeg input file. More...
 

Public Attributes

jpeg_decompress_struct dinfo
 IJG's decompression structure. More...
 
jpeg_error_mgr jerr
 IJG's structures and pointers to those structures used by derived classes. More...
 
jpeg_error_mgr * jerr_ptr
 IJG's structures and pointers to those structures used by derived classes. More...
 
jpeg_compress_struct * cinfo_ptr
 IJG's structures and pointers to those structures used by derived classes. More...
 
jpeg_decompress_struct * dinfo_ptr
 IJG's structures and pointers to those structures used by derived classes. More...
 

Protected Member Functions

virtual JWset_file (const std::string &filename)
 Protected method to set the input or output file. More...
 
virtual JWset_file (FILE *f)
 

Protected Attributes

std::string fname
 The filename used for input (decompress) or output (compress) if set via set_file(). More...
 
FILE * file
 Input/output file. Used for output when compressing, and input when decompressing. More...
 

Detailed Description

Use JWDecompress to decompress an existing .jpg file to RGB image data.

Member Function Documentation

◆ decompress()

JWDecompress & JWDecompress::decompress ( void  )
virtual

Decompress the given data.

◆ get_filename()

virtual std::string JW::get_filename ( void  ) const
inlinevirtualinherited

The filename used for input (decompress) or output (compress) if set via set_file().

The only way to set the input or output file is to call JWCompress::set_output_file() or JWDecompress::set_input_file().

◆ set_file() [1/2]

JW & JW::set_file ( const std::string &  filename)
protectedvirtualinherited

Protected method to set the input or output file.

Use the equivalent functions in the derived classes instead.

See also
JWCompress::set_output_file()
JWDecompress::set_input_file()
Exceptions
std::runtime_errorif the named file cannot be opened
Here is the caller graph for this function:

◆ set_file() [2/2]

JW & JW::set_file ( FILE *  f)
protectedvirtualinherited
Exceptions
std::runtime_errorif the file pointer is null

◆ set_input_file() [1/2]

virtual JWDecompress& JWDecompress::set_input_file ( const std::string &  filename)
inlinevirtual

Set the jpeg input file.

Here is the call graph for this function:

◆ set_input_file() [2/2]

virtual JWDecompress& JWDecompress::set_input_file ( FILE *  f)
inlinevirtual

Set the jpeg input file.

Here is the call graph for this function:

Member Data Documentation

◆ cinfo_ptr

jpeg_compress_struct* JW::cinfo_ptr
inherited

IJG's structures and pointers to those structures used by derived classes.

◆ dinfo

jpeg_decompress_struct JWDecompress::dinfo

IJG's decompression structure.

See also
jpeglib.h

◆ dinfo_ptr

jpeg_decompress_struct* JW::dinfo_ptr
inherited

IJG's structures and pointers to those structures used by derived classes.

◆ file

FILE* JW::file
protectedinherited

Input/output file. Used for output when compressing, and input when decompressing.

◆ fname

std::string JW::fname
protectedinherited

The filename used for input (decompress) or output (compress) if set via set_file().

See also
get_filename()

◆ jerr

jpeg_error_mgr JW::jerr
inherited

IJG's structures and pointers to those structures used by derived classes.

◆ jerr_ptr

jpeg_error_mgr* JW::jerr_ptr
inherited

IJG's structures and pointers to those structures used by derived classes.


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