Sebastjan Trepca wrote:
> I was wondering is it possible to find out which colour is dominant in an
> image using PIL?
> It would be very easy to create interesting mozaic images with that :)
some alternatives:
>>> i = Image.open(...)
>>> i.quantize(1).convert("RGB").getpixel((0, 0))
(208, 205,
Hehe, interesting. I'll try it out.Thanks, SebastjanOn 1/23/06, Terry Hancock <[EMAIL PROTECTED]
> wrote:On 23 Jan 2006 05:47:58 -0800"Rinzwind" <
[EMAIL PROTECTED]> wrote:> For example:>> getdata>> im.getdata() => sequence>> Returns the contents of an image as a sequence object> containing pixel v
On 23 Jan 2006 05:47:58 -0800
"Rinzwind" <[EMAIL PROTECTED]> wrote:
> For example:
>
> getdata
>
> im.getdata() => sequence
>
> Returns the contents of an image as a sequence object
> containing pixel values. The sequence object is flattened,
> so that values for line one follow directly after t
For example:
getdata
im.getdata() => sequence
Returns the contents of an image as a sequence object containing pixel
values. The sequence object is flattened, so that values for line one
follow directly after the values of line zero, and so on.
Note that the sequence object returned by this met
On Sun, 22 Jan 2006 21:07:45 +0100
Sebastjan Trepca <[EMAIL PROTECTED]> wrote:
> I was wondering is it possible to find out which colour is
> dominant in an image using PIL?
> It would be very easy to create interesting mozaic images
> with that :)
Shrink it to one pixel, and get that pixel's valu
Hi!I was wondering is it possible to find out which colour is dominant in an image using PIL? It would be very easy to create interesting mozaic images with that :)Thanks, Sebastjan
--
http://mail.python.org/mailman/listinfo/python-list