[Bf-python] Image.getPixelColor

Austin Benesh bfdeveloper at gmail.com
Sat Apr 30 22:34:35 CEST 2005


Stiv committed it (with a few minor changes). I'm now working on these:

setPixel(i x, i y, f r, f g, f b, f a)
getMinXY()
and
Image.Save()

-- Austin

-----Original Message-----
From: bf-python-bounces at projects.blender.org
[mailto:bf-python-bounces at projects.blender.org] On Behalf Of Jonathan
Merritt
Sent: Friday, April 29, 2005 11:33 PM
To: Blender Foundation Python list
Subject: Re: [Bf-python] Image.getPixelColor

Hi Austin,

This sounds like great work. :-)  I've also been wondering if some kind
of inter-operability could be achieved between Blender Images and Python
Imaging Library (PIL) images.  Many people working with images and
Python will be familiar with PIL.  It can achieve many things that will
probably always be beyond the scope of Blender's image API.

I was wondering if you knew of any inter-operability issues that might
be addressed while you're working on your current code?  Perhaps
following PIL conventions for certain things?  (I'm not sure what
conventions should be taken into account; that's why I'm asking if
you've looked into it. :-)

Obviously Blender needs its own internal binary representation of an
image, but it would be nice if there were some kind of
(semi-)transparent way of using PIL images or the data they contain. 
Maybe this could be done using the Python sequence protocol as an
intermediary?  What do people think?

What I have in my head here is the easy cooperation that exists between
normal Python lists of floats or integers, and numarray arrays (
numeric.scipy.org ).  I think it would be great if we had a similar easy
level of interchange between PIL and Blender.

Jonathan Merritt.


Austin Benesh wrote:

>Ok, the documentation is up and the first patch can be trashed.
>The new patches:
>
>getpixels.diff
>imagedoc_update.diff
>
>Here's what I fixed:
>
>- stupid comments
>- patch not working
>- Max_xy is now MaxXY
>- extra debug code and junk like that
>
>Here's what I still need to add:
>
>- getMinXY
>- setPixelColor (might require an Image.save())
>- any additional operations
>
>Please say if there is anything more that may need fixing or adding.
>  
>
_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python




More information about the Bf-python mailing list