Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Gilbert <ascotan@gmail.com>2005-08-17 18:26:00 +0400
committerJoseph Gilbert <ascotan@gmail.com>2005-08-17 18:26:00 +0400
commit8b060dd5adfe5d56f558e4a600717f2b755d8559 (patch)
treeadd7c4df0056bf27f4397ea62162668956630d49 /source/blender/python/api2_2x/Image.c
parent2872263377aa48233bc4e6a8f298a3706464288c (diff)
- update to constant.c
- give it the key/items interface - creates some factory functions for const generation - genutils methods - method for getting module constants - method for throwing errors with a print string - updates to function names - clean up interpreter launch a bit
Diffstat (limited to 'source/blender/python/api2_2x/Image.c')
-rw-r--r--source/blender/python/api2_2x/Image.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/python/api2_2x/Image.c b/source/blender/python/api2_2x/Image.c
index c7189c4ff11..8d451367901 100644
--- a/source/blender/python/api2_2x/Image.c
+++ b/source/blender/python/api2_2x/Image.c
@@ -389,10 +389,10 @@ static PyObject *Image_setPixelF( BPy_Image * self, PyObject * args )
pixel = ( char * ) image->ibuf->rect;
- pixel[index] = ( int ) ( p[0] * 255.0 );
- pixel[index + 1] = ( int ) ( p[1] * 255.0 );
- pixel[index + 2] = ( int ) ( p[2] * 255.0 );
- pixel[index + 3] = ( int ) ( p[3] * 255.0 );
+ pixel[index] = ( char ) ( p[0] * 255.0 );
+ pixel[index + 1] = ( char ) ( p[1] * 255.0 );
+ pixel[index + 2] = ( char ) ( p[2] * 255.0 );
+ pixel[index + 3] = ( char ) ( p[3] * 255.0 );
Py_RETURN_NONE;
}
@@ -448,10 +448,10 @@ static PyObject *Image_setPixelI( BPy_Image * self, PyObject * args )
pixel = ( char * ) image->ibuf->rect;
- pixel[index] = p[0];
- pixel[index + 1] = p[1];
- pixel[index + 2] = p[2];
- pixel[index + 3] = p[3];
+ pixel[index] = ( char ) p[0];
+ pixel[index + 1] = ( char ) p[1];
+ pixel[index + 2] = ( char ) p[2];
+ pixel[index + 3] = ( char ) p[3];
Py_RETURN_NONE;
}