summaryrefslogtreecommitdiffstats
path: root/src/image.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-02-24 18:57:25 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-02-24 18:57:25 (GMT)
commitc7bc295f92f56d1dea369663e058933f550a0187 (patch)
tree81d72027898b1a75221b9ca82b04075277821a9f /src/image.cpp
parent9793ce49f1d7641854ef0608b34c1dd2d4891a20 (diff)
downloadDoxygen-c7bc295f92f56d1dea369663e058933f550a0187.zip
Doxygen-c7bc295f92f56d1dea369663e058933f550a0187.tar.gz
Doxygen-c7bc295f92f56d1dea369663e058933f550a0187.tar.bz2
Release-1.2.14-20020224
Diffstat (limited to 'src/image.cpp')
-rw-r--r--src/image.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/image.cpp b/src/image.cpp
index ba66438..5806230 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -18,7 +18,7 @@
#include "qtbc.h"
#include "image.h"
-#include "gifenc.h"
+#include "pngenc.h"
#include <qglobal.h>
const int charSetWidth=80;
@@ -321,19 +321,11 @@ void Image::fillRect(int x,int y,int lwidth,int lheight,uchar colIndex,uint mask
bool Image::save(const char *fileName,int mode)
{
- GifEncoder gifenc(data,
- mode==0 ? palette : palette2,
- width,height,
- mode==0 ? 3 : 4,
- 0);
- QFile file(fileName);
- if (file.open(IO_WriteOnly))
- {
- gifenc.writeGIF(file);
- return TRUE;
- }
- else
- {
- return FALSE;
- }
+ PngEncoder enc(data,
+ mode==0 ? palette : palette2,
+ width,height,
+ mode==0 ? 3 : 4,
+ 0);
+ enc.write(fileName);
+ return TRUE;
}