VideoTools
|
Provides some basic information about a jpeg image without full decoding. More...
#include <grjpeg.h>
Public Member Functions | |
JpegInfo (const unsigned char *p, size_t) | |
Constructor. More... | |
JpegInfo (const char *p, size_t) | |
Constructor overload for char. | |
JpegInfo (std::istream &) | |
Constructor overload for an istream. | |
bool | valid () const |
Returns true if constructed successfully. | |
int | dx () const |
Returns the image width. | |
int | dy () const |
Returns the image height. | |
int | channels () const |
Returns the number of channels (eg. 3). | |
Provides some basic information about a jpeg image without full decoding.
Gr::JpegInfo::JpegInfo | ( | const unsigned char * | p, |
size_t | n | ||
) |
Constructor.
This requires the whole file contents because the relevant SOF chunk can be anywhere, so prefer the istream interface.
Definition at line 151 of file grjpeg.cpp.