summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/Palm2QImage.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/Palm2QImage.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/Palm2QImage.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/noncore/apps/opie-reader/Palm2QImage.cpp b/noncore/apps/opie-reader/Palm2QImage.cpp
index 9603877..bf5ece3 100644
--- a/noncore/apps/opie-reader/Palm2QImage.cpp
+++ b/noncore/apps/opie-reader/Palm2QImage.cpp
@@ -1,12 +1,13 @@
1/* -*- mode: c; indent-tabs-mode: nil; -*- */ 1/* -*- mode: c; indent-tabs-mode: nil; -*- */
2#include "useqpe.h"
2#include <stdio.h> 3#include <stdio.h>
3#include <stdlib.h> 4#include <stdlib.h>
4#include <string.h> 5#include <string.h>
5#ifndef WINDOWS 6#ifndef _WINDOWS
6#include <unistd.h> /* for link */ 7#include <unistd.h> /* for link */
7#endif 8#endif
8#include <sys/types.h> 9#include <sys/types.h>
9#include <sys/stat.h> 10#include <sys/stat.h>
10#include <stdarg.h> 11#include <stdarg.h>
11 12
12#include <qimage.h> 13#include <qimage.h>
@@ -199,17 +200,17 @@ QImage* Palm2QImage
199 imagedatastart = palmimage + 24; 200 imagedatastart = palmimage + 24;
200 } else { 201 } else {
201// qDebug("Unknown bits-per-pixel of %d encountered.\n", bits_per_pixel); 202// qDebug("Unknown bits-per-pixel of %d encountered.\n", bits_per_pixel);
202 return NULL; 203 return NULL;
203 } 204 }
204 205
205#ifdef WINDOWS 206#ifndef USEQPE
206 QImage* qimage = new QImage(width, height, 32); 207 QImage* qimage = new QImage(width, height, 32);
207#else 208#else
208 QImage* qimage = new QImage(width, height, 16); 209 QImage* qimage = new QImage(width, height, 16);
209#endif 210#endif
210 211
211 /* row by row, uncompress the Palm image and copy it to the JPEG buffer */ 212 /* row by row, uncompress the Palm image and copy it to the JPEG buffer */
212 rowbuf = new unsigned char[bytes_per_row * width]; 213 rowbuf = new unsigned char[bytes_per_row * width];
213 lastrow = new unsigned char[bytes_per_row * width]; 214 lastrow = new unsigned char[bytes_per_row * width];
214 215
215 for (i=0, palm_ptr = imagedatastart , x_ptr = imagedata; i < height; ++i) { 216 for (i=0, palm_ptr = imagedatastart , x_ptr = imagedata; i < height; ++i) {