libiz.cpp
Go to the documentation of this file.
00001 #include <imagezero/libiz.h>
00002 #include <imagezero/encoder.h>
00003 #include <imagezero/decoder.h>
00004 
00005 namespace IZ
00006 {
00007   unsigned char* encodeImage(const Image<>& im, unsigned char* dest)
00008   {
00009     ImageEncoder<> ic;
00010     ic.begin(dest);
00011     ic.encodeImageSize(im);
00012     ic.encodeImagePixels(im);
00013     return ic.end();
00014   }
00015 
00016   const unsigned char* decodeImage(Image<>& im, const unsigned char* src)
00017   {
00018     ImageDecoder<> ic;
00019     ic.begin(src);
00020     ic.skipImageSize();
00021     ic.decodeImagePixels(im);
00022     return ic.end();
00023   }
00024 
00025   void decodeImageSize(Image<>& im, const unsigned char* src)
00026   {
00027     ImageDecoder<> ic;
00028     ic.begin(src);
00029     ic.decodeImageSize(im);
00030     ic.end();
00031   }
00032 } // namespace IZ


imagezero
Author(s):
autogenerated on Thu Jun 6 2019 21:34:51