7 #ifndef IMAGINE_GRAPHICS_IMAGEIO_H 8 #define IMAGINE_GRAPHICS_IMAGEIO_H 30 void putColorImage(
int x,
int y,
const Color* cols,
int w,
int h,
bool xorMode =
false,
double fact = 1.);
55 void putColorImage(
int x,
int y,
const byte *rgb,
int w,
int h,
bool xorMode =
false,
double fact = 1.);
80 void putColorImage(
int x,
int y,
const byte *r,
const byte *g,
const byte *b,
int w,
int h,
bool xorMode =
false,
double fact = 1.);
93 inline void putColorImage(
const IntPoint2& p,
const byte *r,
const byte *g,
const byte *b,
int w,
int h,
bool xorMode =
false,
double fact = 1.)
120 void putColorImage(
int x,
int y,
const byte *r,
const byte *g,
const byte *b,
const byte *a,
int w,
int h,
bool xorMode =
false,
double fact = 1.);
132 inline void putColorImage(
const IntPoint2& p,
const byte *r,
const byte *g,
const byte *b,
const byte *a,
int w,
int h,
bool xorMode =
false,
double fact = 1.)
145 void putAlphaColorImage(
int x,
int y, byte *rgba,
int w,
int h,
bool xorMode =
false,
double fact = 1.);
169 void putGreyImage(
int x,
int y,
const byte* g,
int w,
int h,
bool xorMode =
false,
double fact = 1.);
255 bool loadColorImage(
const std::string &name, byte *&rgb,
int &w,
int &h);
277 bool loadColorImage(
const std::string &name, byte *&r, byte *&g, byte *&b,
int &w,
int &h);
288 bool loadColorImage(
const std::string &name, byte *&r, byte *&g, byte *&b, byte*&a,
int &w,
int &h);
299 bool loadGreyImage(
const std::string& name, byte*& g,
int& w,
int& h);
314 bool saveColorImage(
const std::string& name,
const Color* cols,
int w,
int h,
int quality = 85);
338 bool saveColorImage(
const std::string &name,
const byte *rgb,
int w,
int h,
int quality = 85);
350 bool saveAlphaColorImage(
const std::string &name, byte *rgba,
int w,
int h,
int quality = 85);
362 bool saveColorImage(
const std::string &name,
const byte *r,
const byte *g,
const byte *b,
int w,
int h,
int quality = 85);
374 bool saveAlphaColorImage(
const std::string &name,
const byte *r,
const byte *g,
const byte *b,
const byte *a,
int w,
int h,
int quality = 85);
386 bool saveGreyImage(
const std::string& name,
const byte* g,
int w,
int h,
int quality = 85);
453 void captureRectangle(
int x,
int y, byte *R, byte *G, byte *B,
int w,
int h);
490 void captureWindow(byte *&R, byte *&G, byte *&B,
int &w,
int &h);
494 #ifndef DOXYGEN_SHOULD_SKIP_THIS 495 class NativeBitmapInternal;
515 NativeBitmapInternal* priv;
541 void setColorImage(
int x,
int y,
const byte *r,
const byte *g,
const byte *b,
int w,
int h);
605 void setGreyImage(
int x,
int y,
const byte *g,
int w,
int h);
654 #endif // IMAGINE_GRAPHICS_IMAGEIO_H
bool saveColorImage(const std::string &name, const Color *cols, int w, int h, int quality=85)
Save color image.
void captureRectangle(int x, int y, Color *c, int w, int h)
Capture (sub window).
AlphaColor * convertColorToAlphaColor(const Imagine::Color *cols, int w, int h)
Convert a Color Image to a AlphaColor Image.
Native bitmap: image stored in graphics card format, fast to display.
Definition: ImageIO.h:514
void setGreyImage(const IntPoint2 &p, const byte *g, int w, int h)
Set grey image.
Definition: ImageIO.h:615
bool loadColorImage(const std::string &name, Color *&cols, int &w, int &h)
Load color image.
void putNativeBitmap(int x, int y, const NativeBitmap &bm, bool xorMode=false, double fact=1.)
Display native bitmap.
NativeBitmap()
Empty constructor.
RGB< byte > Color
RGB<byte> alias.
Definition: Color.h:281
const NativeBitmap & operator=(const NativeBitmap &I)
Assignment.
void setColorImage(int x, int y, const byte *r, const byte *g, const byte *b, int w, int h)
Set color image.
void captureWindow(Color *&cols, int &w, int &h)
Window capture.
Color capturePoint(int x, int y)
Capture (point).
bool loadGreyImage(const std::string &name, byte *&g, int &w, int &h)
Load grey image.
bool saveAlphaColorImage(const std::string &name, Imagine::AlphaColor *cols, int w, int h, int quality=85)
Save color image with alpha channel.
const T & x() const
Read alias.
Definition: FVector.h:104
void putAlphaColorImage(int x, int y, Imagine::AlphaColor *cols, int w, int h, bool xorMode=false, double fact=1.)
Display color bitmap with alpha channel.
RED GREEN BLUE Alpha color.
Definition: Color.h:138
void setMaskFromColor(byte *&r, byte *&g, byte *&b, byte *&a, int w, int h, const Color &col)
Create a transparency mask from a specified color-key.
void setPoint(const IntPoint2 &p, Color col)
Set point.
Definition: ImageIO.h:634
void setColorImage(const IntPoint2 &p, const byte *r, const byte *g, const byte *b, int w, int h)
Set color image.
Definition: ImageIO.h:551
void setColorImage(int x, int y, const byte *rgb, int w, int h)
Set color image.
Definition: ImageIO.h:583
void putColorImage(int x, int y, const Color *cols, int w, int h, bool xorMode=false, double fact=1.)
Display color bitmap.
~NativeBitmap()
Destructor.
void setGreyImage(int x, int y, const byte *g, int w, int h)
Set grey image.
bool saveGreyImage(const std::string &name, const byte *g, int w, int h, int quality=85)
Save grey image.
void setColorImage(const IntPoint2 &p, const byte *rgb, int w, int h)
Set color image.
Definition: ImageIO.h:594
friend void putNativeBitmap(const IntPoint2 &p, const NativeBitmap &bm, bool xorMode=false, double fact=1.)
Display native bitmap.
Definition: ImageIO.h:647
void putGreyImage(int x, int y, const byte *g, int w, int h, bool xorMode=false, double fact=1.)
Display grey bitmap.
bool loadAlphaColorImage(const std::string &name, AlphaColor *&acols, int &w, int &h)
Load color image with alpha channel.
void setPoint(int x, int y, Color col)
Set point.
void setColorImage(const IntPoint2 &p, const Color *cols, int w, int h)
Set color image.
Definition: ImageIO.h:572
const T & y() const
Read alias.
Definition: FVector.h:118
Imagine++ namespace.
Definition: Array.h:7
RED GREEN BLUE color.
Definition: Color.h:26
friend void putNativeBitmap(int x, int y, const NativeBitmap &bm, bool xorMode, double fact)
Display native bitmap.