17Image read_image_hdr(
const char *filename,
const bool flipY=
true );
48Image copy(
const Image& image,
const unsigned xmin,
const unsigned ymin,
const unsigned width,
const unsigned height );
54 ImageData( ) : pixels(), width(0), height(0), channels(0), size(0) {}
55 ImageData(
const unsigned w,
const unsigned h,
const unsigned c,
const unsigned s= 1 ) : pixels(w*h*c*s, 0), width(w), height(h), channels(c), size(s) {}
57 unsigned offset(
const unsigned x,
const unsigned y,
const unsigned c= 0 )
const {
return (y * width +x) * channels * size + c * size; }
58 const void *data( )
const {
return pixels.data(); }
59 void *data( ) {
return pixels.data(); }
61 std::vector<unsigned char> pixels;
86ImageData copy(
const ImageData& image,
const unsigned xmin,
const unsigned ymin,
const unsigned width,
const unsigned height );
92int miplevels(
const int width,
const int height );
representation d'une image.
bool write_image_png(const Image &image, const char *filename, const bool flipY=true)
enregistre une image au format .png
bool write_image_preview(const Image &image, const char *filename, const bool flipY=true)
raccourci pour write_image_png(tone(image, range(image)), "image.png")
bool write_image_hdr(const Image &image, const char *filename, const bool flipY=true)
enregistre une image au format .hdr
unsigned read_image_size(const char *filename)
renvoie la taille en octets de l'image chargee. ou 0 si erreur.
bool write_image_bmp(const Image &image, const char *filename, const bool flipY=true)
enregistre une image au format .bmp
Image mipmap(const Image &image)
reduit une image.
ImageData read_image_data(const char *filename, const bool flipY=true)
charge les donnees d'un fichier png. renvoie une image initialisee par defaut en cas d'echec.
Image flipY(const Image &image)
retourne l'image
Image flipX(const Image &image)
retourne l'image
Image read_image(const char *filename, const bool flipY=true)
int write_image_data(ImageData &image, const char *filename, const bool flipY=true)
enregistre des donnees dans un fichier png.
Image linear(const Image &image)
transformation couleur : srgb vers rgb lineaire
bool write_image(const Image &image, const char *filename, const bool flipY=true)
enregistre une image au format .png
Image copy(const Image &image, const unsigned xmin, const unsigned ymin, const unsigned width, const unsigned height)
renvoie un bloc de l'image
int miplevels(const int width, const int height)
renvoie le nombre de mipmap d'une image width x height.
Image srgb(const Image &image)
transformation couleur : rgb lineaire vers srgb
stockage temporaire des donnees d'une image.