PaletteOptimiser

Changeset

133:6158df669d30
2016-02-05 Paul Boddie raw files shortlog changelog graph Experimenting with Cython. Adding some type declarations reduced the running time from 12.3s to 11.5s. simpleimage-cython
optimiserlib.pxd (file)
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/optimiserlib.pxd	Fri Feb 05 16:57:17 2016 +0100
     1.3 @@ -0,0 +1,6 @@
     1.4 +cpdef double within(double v, int lower, int upper)
     1.5 +cpdef int clip(double v)
     1.6 +cpdef double distance(tuple rgb1, tuple rgb2)
     1.7 +cpdef int sign(double x)
     1.8 +cpdef double saturate_value(double x, double exp)
     1.9 +cpdef double amplify_value(double x, double exp)