0

added a fast resize function

Added resize_half() and resize_half_wrap() functions to composite.c and
overviewer.h, to replace the call to PIL's resize function made by
tileset.py. Also added "resize_half" to COverviewerMethods in main.c, so
it can be called from Python. Should increase performance by 10 to 20%
for the entire program.
This commit is contained in:
RamsesA
2012-07-03 20:26:23 -04:00
parent c79a646d10
commit 2b421d6d25
4 changed files with 165 additions and 3 deletions

View File

@@ -69,6 +69,8 @@ PyObject *draw_triangle(PyObject *dest, int inclusive,
int x2, int y2,
unsigned char r2, unsigned char g2, unsigned char b2,
int tux, int tuy, int *touchups, unsigned int num_touchups);
PyObject *resize_half(PyObject *dest, PyObject *src);
PyObject *resize_half_wrap(PyObject *self, PyObject *args);
/* forward declaration of RenderMode object */
typedef struct _RenderMode RenderMode;