diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-27 08:15:44 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-27 08:15:44 +0100 |
commit | c88a67ce878890138dfc5a16d7d834a2f0cce8fc (patch) | |
tree | e75eecac944468a9344ab48f211609b112017629 /src/ScreenDump.cxx | |
parent | 9b3494d95ce96d87bac6b1b159a17ebc2bbcff5d (diff) |
make ScreenDump work on OutputImage
Diffstat (limited to 'src/ScreenDump.cxx')
-rw-r--r-- | src/ScreenDump.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ScreenDump.cxx b/src/ScreenDump.cxx index 3bfd483..7a3447a 100644 --- a/src/ScreenDump.cxx +++ b/src/ScreenDump.cxx @@ -2,7 +2,6 @@ #include <FL/x.H> #include <FL/fl_draw.H> -#include "JPEGOutputImage.H" #include "ScreenDump.H" ScreenDump::ScreenDump(GipfelWidget *gipf) { @@ -27,18 +26,17 @@ ScreenDump::~ScreenDump() { } int -ScreenDump::save(const char *file) { - JPEGOutputImage out(file, 95); +ScreenDump::save(OutputImage *out) { - out.init(w, h); + out->init(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { unsigned char *px = &rgb[(y * w + x) * 3]; - out.set_pixel(x, px[0] * 255, px[1] * 255, px[2] * 255); + out->set_pixel(x, px[0] * 255, px[1] * 255, px[2] * 255); } - out.next_line(); + out->next_line(); } - return out.done(); + return out->done(); } |