Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ImageUtil.h File Reference


Detailed Description

Author:
Ethan Tira-Thompson (ejt) (Creator)
Author
ejt
Name
Revision
1.3
State
Exp
Date
2007/04/09 22:22:04

Definition in file ImageUtil.h.

#include <string>

Include dependency graph for ImageUtil.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ImageUtil

Functions

bool ImageUtil::loadFile (const std::string &file, char *&buf, size_t &size)
 loads a file into memory, returns true if successful
void ImageUtil::releaseFile (char *buf, size_t size)
 releases memory from a previous call to loadFile, triggering munmap() or 'delete' as appropriate
bool ImageUtil::decodeJPEG (char *inbuf, size_t inbufSize, size_t &width, size_t &height, size_t &channels, char *&outbuf, size_t &outbufSize, const std::string &filename="")
 decodes a JPEG image already in memory, returns true if successful
bool ImageUtil::decodePNG (char *inbuf, size_t inbufSize, size_t &width, size_t &height, size_t &channels, char *&outbuf, size_t &outbufSize)
 decodes a PNG image already in memory, returns true if successful
bool ImageUtil::decodeImage (char *inbuf, size_t inbufSize, size_t &width, size_t &height, size_t &channels, char *&outbuf, size_t &outbufSize)
 decodes an image already in memory -- if it looks like a PNG decodePNG() will be called, otherwise decodeJPEG(); returns true if successful
bool ImageUtil::loadJPEG (const std::string &file, size_t &width, size_t &height, size_t &channels, char *&outbuf, size_t &outbufSize)
 decodes a JPEG from disk, returns true if successful
bool ImageUtil::loadPNG (const std::string &file, size_t &width, size_t &height, size_t &channels, char *&outbuf, size_t &outbufSize)
 decodes a PNG from disk, returns true if successful
bool ImageUtil::loadImage (const std::string &file, size_t &width, size_t &height, size_t &channels, char *&outbuf, size_t &outbufSize)
 decodes an image from file on disk -- if it looks like a PNG decodePNG() will be called, otherwise decodeJPEG(); returns true if successful
size_t ImageUtil::encodeJPEG (char *inbuf, size_t inbufSize, size_t width, size_t height, size_t inbufChannels, char *&outbuf, size_t &outbufSize, size_t outbufChannels, int quality)
 encodes a JPEG from a pixel buffer into another memory buffer, returns number of bytes used, 0 if error
size_t ImageUtil::encodeJPEG (char *inbuf, size_t inbufSize, size_t width, size_t height, size_t inbufChannels, char *&outbuf, size_t &outbufSize, size_t outbufChannels, int quality, jpeg_compress_struct &cinfo)
 encodes a JPEG from a pixel buffer into another memory buffer, returns number of bytes used, 0 if error
size_t ImageUtil::encodeJPEG (char *inbuf, size_t inbufSize, size_t width, size_t height, size_t inbufChannels, char *&outbuf, size_t &outbufSize, size_t outbufChannels, int quality, unsigned int yskip, unsigned int uvskip, jpeg_compress_struct &cinfo)
 encodes a JPEG from a pixel buffer into another memory buffer, returns number of bytes used, 0 if error
size_t ImageUtil::encodePNG (char *inbuf, size_t inbufSize, size_t width, size_t height, size_t inbufChannels, char *&outbuf, size_t &outbufSize, size_t outbufChannels)
 encodes a JPEG from a pixel buffer into another memory buffer, returns number of bytes used, 0 if error


Tekkotsu v3.0
Generated Fri May 11 20:05:36 2007 by Doxygen 1.4.7