PIL how to display multiple images side by side

Alf P. Steinbach alfps at start.no
Mon Jan 11 17:07:34 EST 2010


* suresh.amritapuri:
> On Jan 9, 9:51 pm, "Alf P. Steinbach" <al... at start.no> wrote:
>> * Lie Ryan:
>>
>>> On 1/9/2010 8:43 AM, suresh.amritapuri wrote:
>>>> Hi,
>>>> In PIL, how to display multiple images in say m rows and n colums when
>>>> I have m*n images.
>>>> suresh
>>> Tkinter has PhotoImage widget and PIL has support for this widget:
>>> http://www.pythonware.com/library/pil/handbook/imagetk.htm
>> Maybe I've misunderstood something (in that case glad to learn!), but I believe
>> PhotoImage is not a widget, and that a PhotoImage has to be presented in e.g. a
>> Label widget or some other widget that's able to display images.
>>
>> Cheers,
>>
>> - Alf
> 
> Hi,
> Let me paste the code I have adapted from somewhere. I dont get a clue
> on how to go further so that all the images would stay in their
> respective positions.

I suggest you use the grid layout manager.

Uh, "geometry mangler".


Cheers,

- Alf



More information about the Python-list mailing list