Re: Dominant color & PIL

2006-01-24 Thread Fredrik Lundh
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,

Re: Dominant color & PIL

2006-01-23 Thread Sebastjan Trepca
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

Re: Dominant color & PIL

2006-01-23 Thread Terry Hancock
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

Re: Dominant color & PIL

2006-01-23 Thread Rinzwind
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

Re: Dominant color & PIL

2006-01-22 Thread Terry Hancock
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

Dominant color & PIL

2006-01-22 Thread Sebastjan Trepca
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