21 #ifndef GR_IMAGE_DECODER__H
22 #define GR_IMAGE_DECODER__H
50 G_EXCEPTION( Error ,
"image decoding error" ) ;
55 ScaleToFit(
int dx ,
int dy ,
int fudge_factor ) ;
56 int operator()(
const ImageType & )
const ;
57 operator bool()
const ;
66 void setup(
int scale ,
bool monochrome_out ) ;
112 static bool jpegAvailable() ;
113 static bool pngAvailable() ;
117 bool m_monochrome_out ;
125 Gr::ImageDecoder::ScaleToFit::ScaleToFit() :
133 Gr::ImageDecoder::ScaleToFit::ScaleToFit(
int dx_ ,
int dy_ ,
int ff_ ) :
ImageType decodeInPlace(ImageType type_in, char *&p, size_t size_in, ImageData &store)
Decodes an image buffer with raw decoding done in-place.
A read interface for libpng.
A holder for image data, having eight bits per sample and one or three channels.
void setup(int scale, bool monochrome_out)
Sets the scale factor.
An encapsulation of image type, including width, height and number of channels, with support for a st...
Vectors ImageBuffer
An ImageBuffer is used to hold raw image data, typically in more than one chunk.
An interface for decoding encoded images into a raw format.
ImageDecoder()
Default constructor.
A read interface for libjpeg.
static ImageType readType(const G::Path &path, bool do_throw=true)
A convenience function to read a file's image type.
ImageType decode(const G::Path &path_in, ImageData &out, const ScaleToFit &=ScaleToFit())
Decodes a file, with a scale-to-fit option.
Describes scale-to-fit target dimensions.
A static interface for reading portable-anymap (pnm) files.
A Path object represents a file system path.