Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
STK::ImageJpegIO Class Reference

#include <StkImageJpegIO.h>

Inheritance diagram for STK::ImageJpegIO:
STK::ImageIO

Public Member Functions

 ImageJpegIO ()
 
 ImageJpegIO (std::string filename)
 
bool load (Image &img) override
 Load JPEG file to the given Image.
 
bool save (const Image &img) override
 Save given Image to JPEG file.
 
bool readHeader (Image &img) override
 
bool open (OpenMode mode=READ) override
 
bool close () override
 
void setQuality (int q)
 Set JPEG compression quality (0-100).
 
int getQuality () const
 
- Public Member Functions inherited from STK::ImageIO
 ImageIO (const std::string &filename, const char *opts=nullptr)
 
void setFilename (const std::string &filename)
 
const std::string & getFilename () const
 
virtual bool readSubImage (const Image &hdr, Image &img, int startx, int starty, int width, int height)
 
virtual bool load (Image &img)=0
 
virtual bool save (const Image &img)=0
 
virtual bool readHeader (Image &img)=0
 
virtual bool open (OpenMode mode=READ)=0
 
virtual bool close ()=0
 
virtual void setOptions (const char *)
 

Additional Inherited Members

- Public Types inherited from STK::ImageIO
enum  OpenMode { READ = 0 , WRITE }
 
- Static Public Member Functions inherited from STK::ImageIO
static std::unique_ptr< ImageIOcreate (const std::string &filename, const char *opts=nullptr)
 
static std::unique_ptr< ImageIOcreate (const std::vector< uint8_t > &imageBuffer)
 
- Protected Attributes inherited from STK::ImageIO
std::string filename_
 

Detailed Description

ImageJpegIO - Load and save JPEG images. This class can be used to load and save Image objects in JPEG format. No fancy JPEG features are used, the only tunable parameter is the compression quality parameter which must be in the interval [0, 100].

Author
Thomas E. Sevaldrud tse@m.nosp@m.ath..nosp@m.sinte.nosp@m.f.no
See also
Image
ImageIO

Constructor & Destructor Documentation

◆ ImageJpegIO() [1/2]

ImageJpegIO::ImageJpegIO ( )

Default Constructor. This constructor creates an object with compression quality 75.

◆ ImageJpegIO() [2/2]

STK::ImageJpegIO::ImageJpegIO ( std::string  filename)
explicit

Constructor. This constructor creates an object with compression quality 75 and the given filename.

Member Function Documentation

◆ close()

bool ImageJpegIO::close ( )
overridevirtual

Implements STK::ImageIO.

◆ load()

bool ImageJpegIO::load ( Image img)
overridevirtual

Load JPEG file to the given Image.

Implements STK::ImageIO.

◆ open()

bool ImageJpegIO::open ( OpenMode  mode = READ)
overridevirtual

Implements STK::ImageIO.

◆ readHeader()

bool ImageJpegIO::readHeader ( Image img)
overridevirtual

Implements STK::ImageIO.

◆ save()

bool ImageJpegIO::save ( const Image img)
overridevirtual

Save given Image to JPEG file.

Implements STK::ImageIO.


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