equal
deleted
inserted
replaced
1 /****************************************************************************** |
1 /****************************************************************************** |
2 * |
2 * |
3 * |
3 * |
4 * |
4 * |
5 * |
5 * |
6 * Copyright (C) 1997-2008 by Dimitri van Heesch. |
6 * Copyright (C) 1997-2010 by Dimitri van Heesch. |
7 * |
7 * |
8 * Permission to use, copy, modify, and distribute this software and its |
8 * Permission to use, copy, modify, and distribute this software and its |
9 * documentation under the terms of the GNU General Public License is hereby |
9 * documentation under the terms of the GNU General Public License is hereby |
10 * granted. No representations are made about the suitability of this software |
10 * granted. No representations are made about the suitability of this software |
11 * for any purpose. It is provided "as is" without express or implied warranty. |
11 * for any purpose. It is provided "as is" without express or implied warranty. |
47 int width; |
47 int width; |
48 int height; |
48 int height; |
49 uchar *data; |
49 uchar *data; |
50 }; |
50 }; |
51 |
51 |
|
52 class ColoredImage |
|
53 { |
|
54 public: |
|
55 ColoredImage(int width,int height, |
|
56 const uchar *greyLevels,const uchar *alphaLevels, |
|
57 int saturation,int hue,int gamma); |
|
58 ~ColoredImage(); |
|
59 bool save(const char *fileName); |
|
60 static void hsl2rgb(double h,double s,double l, |
|
61 double *pRed,double *pGreen,double *pBlue); |
|
62 private: |
|
63 int m_width; |
|
64 int m_height; |
|
65 uchar *m_data; |
|
66 bool m_hasAlpha; |
|
67 }; |
|
68 |
52 #endif |
69 #endif |