summaryrefslogtreecommitdiff
path: root/src/ScanImage.H
blob: e318273cb7d96d4b1a10a12e798f4a8ae1d6bb11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// Copyright 2006 Johannes Hofmann <Johannes.Hofmann@gmx.de>
//
// This software may be used and distributed according to the terms
// of the GNU General Public License, incorporated herein by reference.

#ifndef ScanImage_H
#define ScanImage_H

#include <FL/Fl_Image.H>

class ScanImage {
	private:
		static int get_pixel_nearest(Fl_Image *img, double x, double y,
			int *r, int *g, int *b);
		static int get_pixel_bicubic(Fl_Image *img, double x, double y,
			int *r, int *g, int *b);
		static int get_pixel(Fl_Image *img, int x, int y,
			int *r, int *g, int *b);

	public:
		typedef enum {
			NEAREST  = 0,
			BICUBIC  = 1
		} mode_t;

		static int get_pixel(Fl_Image *img, mode_t mode,
			double x, double y, int *r, int *g, int *b);
};

#endif