From c88a67ce878890138dfc5a16d7d834a2f0cce8fc Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Fri, 27 Mar 2009 08:15:44 +0100 Subject: make ScreenDump work on OutputImage --- src/ScreenDump.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/ScreenDump.cxx') 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 #include -#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(); } -- cgit v1.2.3