summaryrefslogtreecommitdiffstats
path: root/pixels.h
diff options
context:
space:
mode:
authorHenning Makholm <henning@makholm.net>2006-02-11 18:00:00 (EST)
committer Julien Jorge <julien.jorge@stuff-o-matic.com>2013-01-10 16:03:45 (EST)
commit00a8b13b5bf8cf2c367a0db3ae09086e45230968 (patch)
tree2cf634f141fc82b26bf1cfcc9de4c6f194208905 /pixels.h
parent03c71dffc5d7bcb4686260b21aaa268d68310613 (diff)
downloadxcftools-00a8b13b5bf8cf2c367a0db3ae09086e45230968.zip
xcftools-00a8b13b5bf8cf2c367a0db3ae09086e45230968.tar.gz
xcftools-00a8b13b5bf8cf2c367a0db3ae09086e45230968.tar.bz2
Import of release 0.9
Diffstat (limited to 'pixels.h')
-rw-r--r--pixels.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/pixels.h b/pixels.h
index 8d8ea2e..1ee5219 100644
--- a/pixels.h
+++ b/pixels.h
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef PIXELS_H
@@ -53,7 +53,17 @@ typedef uint32_t rgba ;
#define NULLALPHA(rgba) ((uint8_t)(rgba) == 0)
#define NEWALPHA(rgb,a) (((rgba)(rgb) & 0xFFFFFF00) + (a))
+#ifdef PRECOMPUTED_SCALETABLE
extern const uint8_t scaletable[256][256] ;
+#define INIT_SCALETABLE_IF(foo) ((void)0)
+#else
+extern uint8_t scaletable[256][256] ;
+extern int ok_scaletable ;
+void mk_scaletable(void);
+#define INIT_SCALETABLE_IF(foo) \
+ (ok_scaletable || !(foo) || (mk_scaletable(),0) )
+#endif
+
extern const rgba graytable[256] ;
extern rgba colormap[256] ;
extern unsigned colormapLength ;