Hello
I am trying to use the where function on a numpy array which was obtained
from an image using the asarray function. The code is as follows:
from numpy import *
from Image import *
im=open("a.gif")
im2=im.convert("RGBA")
a2 = asarray(im2,uint8)
c = zeros((140,90,4),uint8)
c[:,:]
: DVCS at PyCon (Matthieu Brucher)
5. numpy import on x86_64 arch (Vincent Thierion)
6. Re: numpy import on x86_64 arch (David Cournapeau)
7. Replacing colours in numpy array (Frank Peacock)
--
Message: 1
Date: Fri, 1
Hello
Apologies for the incorrect posting before.
The problem was that I was not using an array for the true condition and
instead was using a scalar.
Frank
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.
Hello
I have a numpy array that I obtained from a converted RGBA gif image. I have
tried to replace some colours with different ones using the where condition
but have a problem with dimensions.
If I use b=where(a==0,255,a) where a is a numpy array from an image it does
replace components of the
Hello
I am familiar with the fromarray function in the pil library Image module to
plot pixels. Is it possible to do the same for drawtext for text or paste
for images without looping with lists?
Thanks
Frank
___
Numpy-discussion mailing list
Many thanks Robert.
Frank
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Hello
I would like to know whether I can do the following in some other way as
this fails with setting an array with a sequence on each of the colour
arrays:
h,w=720,410
img = ones((h,w,3), uint8)*255
img[ngridn,ngride]=(ncolour[0],ncolour[1],ncolour[2])
pilImage = Image.fromarray(img, '