plptools
Loading...
Searching...
No Matches
psibitmap.h
Go to the documentation of this file.
1/*
2 * This file is part of plptools.
3 *
4 * Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * along with this program; if not, see <https://www.gnu.org/licenses/>.
18 *
19 */
20
21#ifndef _PSIBITMAP_H_
22#define _PSIBITMAP_H_
23
24#include "bufferstore.h"
25
34typedef int (*getPixelFunction_t)(int x, int y);
35
46extern void
47encodeBitmap(int width, int height, getPixelFunction_t getPixel,
48 bool rle, bufferStore &out);
49
64extern bool
65decodeBitmap(const unsigned char *p, int &width, int &height, bufferStore &out);
66
67#endif // !_PSIBITMAP_H_
A generic container for an array of bytes.
Definition: bufferstore.h:37
int(* getPixelFunction_t)(int x, int y)
This function is used by encodeBitmap for retrieving image data.
Definition: psibitmap.h:34
bool decodeBitmap(const unsigned char *p, int &width, int &height, bufferStore &out)
Convert a Psion bitmap to a 8bit/pixel grayscale image.
Definition: psibitmap.cpp:141
void encodeBitmap(int width, int height, getPixelFunction_t getPixel, bool rle, bufferStore &out)
Convert an image into a bitmap in Psion format.
Definition: psibitmap.cpp:26