7 #ifndef IMAGINE_GRAPHICS_IMAGEIO_H
8 #define IMAGINE_GRAPHICS_IMAGEIO_H
32 void putColorImage(
int x,
int y,
const Color* cols,
int w,
int h,
bool xorMode =
false,
double fact = 1.);
57 void putColorImage(
int x,
int y,
const byte *rgb,
int w,
int h,
bool xorMode =
false,
double fact = 1.);
82 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.);
95 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.)
122 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.);
134 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.)
147 void putAlphaColorImage(
int x,
int y, byte *rgba,
int w,
int h,
bool xorMode =
false,
double fact = 1.);
171 void putGreyImage(
int x,
int y,
const byte* g,
int w,
int h,
bool xorMode =
false,
double fact = 1.);
257 bool loadColorImage(
const std::string &name, byte *&rgb,
int &w,
int &h);
279 bool loadColorImage(
const std::string &name, byte *&r, byte *&g, byte *&b,
int &w,
int &h);
290 bool loadColorImage(
const std::string &name, byte *&r, byte *&g, byte *&b, byte*&a,
int &w,
int &h);
301 bool loadGreyImage(
const std::string& name, byte*& g,
int& w,
int& h);
316 bool saveColorImage(
const std::string& name,
const Color* cols,
int w,
int h,
int quality = 85);
340 bool saveColorImage(
const std::string &name,
const byte *rgb,
int w,
int h,
int quality = 85);
352 bool saveAlphaColorImage(
const std::string &name, byte *rgba,
int w,
int h,
int quality = 85);
364 bool saveColorImage(
const std::string &name,
const byte *r,
const byte *g,
const byte *b,
int w,
int h,
int quality = 85);
376 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);
388 bool saveGreyImage(
const std::string& name,
const byte* g,
int w,
int h,
int quality = 85);
455 void captureRectangle(
int x,
int y, byte *R, byte *G, byte *B,
int w,
int h);
493 void captureWindow(byte *&R, byte *&G, byte *&B,
int &w,
int &h);
497 #ifndef DOXYGEN_SHOULD_SKIP_THIS
498 class NativeBitmapInternal;
501 void putNativeBitmap(
int x,
int y,
const NativeBitmap &bm,
bool xorMode=
false,
double fact=1.);
518 NativeBitmapInternal* priv;
544 void setColorImage(
int x,
int y,
const byte *r,
const byte *g,
const byte *b,
int w,
int h);
608 void setGreyImage(
int x,
int y,
const byte *g,
int w,
int h);
657 #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:517
Coords< 2 > IntPoint2
Plane point with integral coordinates.
Definition: Types.h:17
void setGreyImage(const IntPoint2 &p, const byte *g, int w, int h)
Set grey image.
Definition: ImageIO.h:618
RGBA< byte > AlphaColor
RGBA alias.
Definition: Color.h:354
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 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.
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:637
void setColorImage(const IntPoint2 &p, const byte *r, const byte *g, const byte *b, int w, int h)
Set color image.
Definition: ImageIO.h:554
void setColorImage(int x, int y, const byte *rgb, int w, int h)
Set color image.
Definition: ImageIO.h:586
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:597
friend void putNativeBitmap(const IntPoint2 &p, const NativeBitmap &bm, bool xorMode=false, double fact=1.)
Display native bitmap.
Definition: ImageIO.h:650
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:575
const T & x() const
Read alias.
Definition: FVector.h:104
Imagine++ namespace.
Definition: Array.h:7
RED GREEN BLUE color.
Definition: Color.h:26
const T & y() const
Read alias.
Definition: FVector.h:118
friend void putNativeBitmap(int x, int y, const NativeBitmap &bm, bool xorMode, double fact)
Display native bitmap.