Wayne Watson | 1 Apr 2009 16:20
Picon
Favicon

Default Tkinter Structure of a 640x480 PIL BMP File?

See Subject. Does it have a header, DIB,  palette, and data section? What is the default depth?
--
Signature.html Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Michael O'Donnell | 1 Apr 2009 19:10
Picon
Picon
Favicon

Re: Default Tkinter Structure of a 640x480 PIL BMPFile?

Dear Wayne,

  Probably better directed at the PIL/Image list:

http://mail.python.org/mailman/listinfo/image-sig

In any case a BMP file has a structure independent of the software which
reads it, do a google for bmp to find information on it.

Once an image is loaded into PIL, PIL offers methods to access
the image. See PIL documentation for these methods:

http://www.pythonware.com/library/pil/handbook/index.htm

Mick

2009/4/1 Wayne Watson <sierra_mtnview <at> sbcglobal.net>:
> See Subject. Does it have a header, DIB,  palette, and data section? What is
> the default depth?
> --
>
>            Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
>
>              (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
>
>
>           The Obama Administration plans to double the production
>           in solar energy from 1% to 2% of the total energy
>           supply in the next few years. One nuclear reaction
>           would do the same. Heard on Bill Wattenburg, KGO-AM
>
>           "Less than all cannot satisfy Man." -- William Blake
>
>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss <at> python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>
>
Wayne Watson | 1 Apr 2009 21:43
Picon
Favicon

Re: Default Tkinter Structure of a 640x480 PIL BMPFile?

Thanks, but there seem to be an unending # of mail lists for Python.
I've rummaged around the link before you gave, but zippo. I just tried this on Google:

bmp bits site:http://www.pythonware.com/library/pil/handbook/index.htm

It searches the entire site. Zippo again.

I guess it's another mail list to join.

Whoops, this a better search:
bmp bits site: http://www.pythonware.com/library/pil/

Nothing of interest. Well, maybe I stuck in 24 and one hit discusses decoder.

Michael O'Donnell wrote:
Dear Wayne, Probably better directed at the PIL/Image list: http://mail.python.org/mailman/listinfo/image-sig In any case a BMP file has a structure independent of the software which reads it, do a google for bmp to find information on it. Once an image is loaded into PIL, PIL offers methods to access the image. See PIL documentation for these methods: http://www.pythonware.com/library/pil/handbook/index.htm Mick 2009/4/1 Wayne Watson <sierra_mtnview <at> sbcglobal.net>:
See Subject. Does it have a header, DIB,  palette, and data section? What is the default depth? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

--
Signature.html Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Igor Novikov | 1 Apr 2009 22:08
Picon

Re: Default Tkinter Structure of a 640x480 PIL BMPFile?

Hi Wayne,

I think you can find an answer in PIL source code. Take look at Imaging.h
The header contains Imaging object definition. Loaded image is not BMP, PNG, TIFF
or any other storage format because it's impossible to process image in memory
using storage format structure (for example, they often use compression).

Sincerely,

Igor Novikov
sK1 Project
http://sk1project.org

2009/4/1 Wayne Watson <sierra_mtnview <at> sbcglobal.net>
Thanks, but there seem to be an unending # of mail lists for Python.
I've rummaged around the link before you gave, but zippo. I just tried this on Google:

bmp bits site:http://www.pythonware.com/library/pil/handbook/index.htm

It searches the entire site. Zippo again.

I guess it's another mail list to join.

Whoops, this a better search:
bmp bits site: http://www.pythonware.com/library/pil/

Nothing of interest. Well, maybe I stuck in 24 and one hit discusses decoder.

Michael O'Donnell wrote:
Dear Wayne, Probably better directed at the PIL/Image list: http://mail.python.org/mailman/listinfo/image-sig In any case a BMP file has a structure independent of the software which reads it, do a google for bmp to find information on it. Once an image is loaded into PIL, PIL offers methods to access the image. See PIL documentation for these methods: http://www.pythonware.com/library/pil/handbook/index.htm Mick 2009/4/1 Wayne Watson <sierra_mtnview <at> sbcglobal.net>:
See Subject. Does it have a header, DIB,  palette, and data section? What is the default depth? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Wayne Watson | 1 Apr 2009 22:21
Picon
Favicon

Default Tkinter Structure of a 640x480 PIL BMP File?

See Subject. Does it have a header, DIB,  palette, and data section? What is the default depth?
--
Signature.html Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Wayne Watson | 1 Apr 2009 22:29
Picon
Favicon

Re: Default Tkinter Structure of a 640x480 PIL BMPFile?

I'm using Win Python, and have some small familiarity with library compents. How do I find Imaging.h?

Igor Novikov wrote:
Hi Wayne,

I think you can find an answer in PIL source code. Take look at Imaging.h
The header contains Imaging object definition. Loaded image is not BMP, PNG, TIFF
or any other storage format because it's impossible to process image in memory
using storage format structure (for example, they often use compression).

Sincerely,

Igor Novikov
sK1 Project
http://sk1project.org

2009/4/1 Wayne Watson <sierra_mtnview <at> sbcglobal.net>
Thanks, but there seem to be an unending # of mail lists for Python.
I've rummaged around the link before you gave, but zippo. I just tried this on Google:

bmp bits site:http://www.pythonware.com/library/pil/handbook/index.htm

It searches the entire site. Zippo again.

I guess it's another mail list to join.

Whoops, this a better search:
bmp bits site: http://www.pythonware.com/library/pil/

Nothing of interest. Well, maybe I stuck in 24 and one hit discusses decoder.

Michael O'Donnell wrote:
Dear Wayne, Probably better directed at the PIL/Image list: http://mail.python.org/mailman/listinfo/image-sig In any case a BMP file has a structure independent of the software which reads it, do a google for bmp to find information on it. Once an image is loaded into PIL, PIL offers methods to access the image. See PIL documentation for these methods: http://www.pythonware.com/library/pil/handbook/index.htm Mick 2009/4/1 Wayne Watson <sierra_mtnview <at> sbcglobal.net>:
See Subject. Does it have a header, DIB,  palette, and data section? What is the default depth? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss



--
Signature.html Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Igor Novikov | 1 Apr 2009 22:54
Picon

Re: Default Tkinter Structure of a 640x480 PIL BMPFile?

Sorry you have mixed in question three different instances: BMP, PIL and Tkinter.
PIL can works without Tkinter. So PIL image objects don't depend on Tkinter.
But PIL can generates tcl/tk image objects for UI use cases.
BMP is a storage format. It's just an image file but not an image object in memory.
So please clarify your question. Which information you need or which code you
wish implementing?
 

On Wed, Apr 1, 2009 at 11:29 PM, Wayne Watson <sierra_mtnview <at> sbcglobal.net> wrote:
I'm using Win Python, and have some small familiarity with library compents. How do I find Imaging.h?


Igor Novikov wrote:
Hi Wayne,

I think you can find an answer in PIL source code. Take look at Imaging.h
The header contains Imaging object definition. Loaded image is not BMP, PNG, TIFF
or any other storage format because it's impossible to process image in memory
using storage format structure (for example, they often use compression).

Sincerely,

Igor Novikov
sK1 Project
http://sk1project.org

2009/4/1 Wayne Watson <sierra_mtnview <at> sbcglobal.net>
Thanks, but there seem to be an unending # of mail lists for Python.
I've rummaged around the link before you gave, but zippo. I just tried this on Google:

bmp bits site:http://www.pythonware.com/library/pil/handbook/index.htm

It searches the entire site. Zippo again.

I guess it's another mail list to join.

Whoops, this a better search:
bmp bits site: http://www.pythonware.com/library/pil/

Nothing of interest. Well, maybe I stuck in 24 and one hit discusses decoder.

Michael O'Donnell wrote:
Dear Wayne, Probably better directed at the PIL/Image list: http://mail.python.org/mailman/listinfo/image-sig In any case a BMP file has a structure independent of the software which reads it, do a google for bmp to find information on it. Once an image is loaded into PIL, PIL offers methods to access the image. See PIL documentation for these methods: http://www.pythonware.com/library/pil/handbook/index.htm Mick 2009/4/1 Wayne Watson <sierra_mtnview <at> sbcglobal.net>:
See Subject. Does it have a header, DIB,  palette, and data section? What is the default depth? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss



--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Wayne Watson | 2 Apr 2009 03:53
Picon
Favicon

Re: Default Tkinter Structure of a 640x480 PIL BMPFile?

Yes, three items, format, memory, etc. That's not the issue.
 
My question was directed specifically to your comment about Imaging.h. Imaging.h looks like a C-program header file. I use Python with Windows XP. Where do I look in Python to find the equivalent of Imaging.h.

I think my answer requires a post to the PIL mail list.

Igor Novikov wrote:
Sorry you have mixed in question three different instances: BMP, PIL and Tkinter.
PIL can works without Tkinter. So PIL image objects don't depend on Tkinter.
But PIL can generates tcl/tk image objects for UI use cases.
BMP is a storage format. It's just an image file but not an image object in memory.
So please clarify your question. Which information you need or which code you
wish implementing?
 

On Wed, Apr 1, 2009 at 11:29 PM, Wayne Watson <sierra_mtnview <at> sbcglobal.net> wrote:
I'm using Win Python, and have some small familiarity with library compents. How do I find Imaging.h?


Igor Novikov wrote:
Hi Wayne,

I think you can find an answer in PIL source code. Take look at Imaging.h
The header contains Imaging object definition. Loaded image is not BMP, PNG, TIFF
or any other storage format because it's impossible to process image in memory
using storage format structure (for example, they often use compression).

Sincerely,

Igor Novikov
sK1 Project
http://sk1project.org

2009/4/1 Wayne Watson <sierra_mtnview <at> sbcglobal.net>
Thanks, but there seem to be an unending # of mail lists for Python.
I've rummaged around the link before you gave, but zippo. I just tried this on Google:

bmp bits site:http://www.pythonware.com/library/pil/handbook/index.htm

It searches the entire site. Zippo again.

I guess it's another mail list to join.

Whoops, this a better search:
bmp bits site: http://www.pythonware.com/library/pil/

Nothing of interest. Well, maybe I stuck in 24 and one hit discusses decoder.

Michael O'Donnell wrote:
Dear Wayne, Probably better directed at the PIL/Image list: http://mail.python.org/mailman/listinfo/image-sig In any case a BMP file has a structure independent of the software which reads it, do a google for bmp to find information on it. Once an image is loaded into PIL, PIL offers methods to access the image. See PIL documentation for these methods: http://www.pythonware.com/library/pil/handbook/index.htm Mick 2009/4/1 Wayne Watson <sierra_mtnview <at> sbcglobal.net>:
See Subject. Does it have a header, DIB,  palette, and data section? What is the default depth? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss



--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake


--
Signature.html Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Madhu Subramaniam | 7 Apr 2009 11:37
Picon

Font change does reflect window size when executed without debugging

Hi,
Below is an application with a scrollable frame. There is an option to change the font size of the text, (using tkFont) thereby changing the size of the widgets and the containers.
this is done by the function 'fontctrl'. The thing i am not able to figure out is that the change in window size works when i put a breakpoint/debugger (pdb.set_trace()) and exceute them manually in the shell. But when i run w/o debugging, then the print statements do not show me the change in window size.

for example, when the font is medium: self2.winfo_height() shows 840 with debugging but 600 without the debugger in place.

Python version 2.5.2, Tkinter 8.4, OS: Linux, Ubuntu
-----------------------------------------------------------------
(see code below)

from Tkinter import *
import math
import tkColorChooser
import pdb
import os
import string
import threading
from tkFileDialog import *
from tkMessageBox import *
import sys
import tkFont

def window2(fr1,root):

     #Structure
     #            root window
     #-------------------------------------
     #                 |
      #                 |
     #                 |     
     #            fr1 (frame)
     #-------------------------------------------------------------------------
     #         |                   |                            |    
      #         |                   |                            |    
     #         |                   |                            |    
     #    Menu Button  can(Canvas)    Scrollbars (vertical and horizontal)            
     #-----------------------------------------------------------------------------------
     #         |                                           |  
     #         |                                           |  
     #         |                                           |      
     #menu with radiobuttons        fr2(Frame-create_window)     
     # for font change                                          |  
      #                                                     |  
     #                                                 2 rows of labels, optionmenu      


    def fontctrl( rval,self1,self2, can_fr2=0, can=0,fr1=0):
         
     # Change in size (viewed with help of the print statements) found, only when implemented with debugging!!,
     # if pdb.set_trace() is removed, then the change in size is not reflected in the print statements!
     #pdb.set_trace()
     self2.minsize(width = 10, height = 10)
     self2.maxsize(width = 4000, height = 2000)
    
     if rval == 1:
         self1.configure(size=10)
        self2.update_idletasks()
        self2.minsize(width = self2.winfo_width(), height = 640)
        self2.maxsize(width = self2.winfo_width(), height = 640)
        self2.update_idletasks()
        print '#----------------------------------'
        print 'Schrift G:    small'
        print 'self2.winfo_height():     ', self2.winfo_height()
        print 'fr1.winfo_height():      ', fr1.winfo_height()
        print 'can.winfo_height():    ' , can.winfo_height()
        print 'can_fr2.winfo_height():    ' , can_fr2.winfo_height()        
        print '#----------------------------------'
     if rval == 2:
        self1.configure(size=14)    
        self2.update_idletasks()
        self2.minsize(width = self2.winfo_width(), height = 840)
        self2.maxsize(width = self2.winfo_width(), height = 840)
        self2.update_idletasks()
        print '#----------------------------------'
        print 'Schrift G:    Medium'
        print 'self2.winfo_height():     ', self2.winfo_height()
        print 'fr1.winfo_height():      ', fr1.winfo_height()
        print 'can.winfo_height():    ' , can.winfo_height()
        print 'can_fr2.winfo_height():    ' , can_fr2.winfo_height()        
        print '#----------------------------------'

     if rval == 3:
        self1.configure(size=16)
        self2.update_idletasks()
        self2.minsize(width = self2.winfo_width(), height = 940)
        self2.maxsize(width = self2.winfo_width(), height = 940)
        self2.update_idletasks()
        print '#----------------------------------'
        print 'Schrift G:    Big'
        print 'self2.winfo_height():     ', self2.winfo_height()
        print 'fr1.winfo_height():      ', fr1.winfo_height()
        print 'can.winfo_height():    ' , can.winfo_height()
        print 'can_fr2.winfo_height():    ' , can_fr2.winfo_height()        
        print '#----------------------------------'

     try:    
        can_fr2.update_idletasks()
        can.update_idletasks()
        can.config(scrollregion=(0,0,max(can.winfo_width(), can_fr2.winfo_width()),max(can.winfo_height(), can_fr2.winfo_height())))    
        scrollx.update_idletasks()
        scrolly.update_idletasks()
     except:
         pass


    global content
#font and grid options for fr1
#-------------------------------------------------------------------------------------------------
        fonts = tkFont.Font(family="MS Sans Serif",size=12, weight="bold")
    fr1.grid_columnconfigure(0,weight=1)
    fr1.grid_rowconfigure(1,weight=1)
    fr_menu= Frame(fr1,  bg= 'turquoise')
    fr_menu.grid_propagate(1)
    root.grid_rowconfigure(0,weight=1)
    root.grid_columnconfigure(0,weight=1)
    fr_menu.grid(row=0,column=0, sticky = 'news')

#Canvas, scrollbars    
#----------------------------------------------------------------------------------------------------------------------------------------------------------    
    can= Canvas(fr1, relief='groove')
    can.grid(row=1, column=0, sticky = 'news')
    can.fr2 = Frame(can, width = 100, height = 50)
    var1= StringVar()
    var1.set('1')
    scrollx= Scrollbar(fr1, orient=HORIZONTAL)
    scrolly= Scrollbar(fr1, orient=VERTICAL)
    scrollx.config(command=can.xview)
    scrolly.config(command=can.yview)
    scrollx.grid(row=2,column=0, sticky= S+E+W,columnspan=3)
    scrolly.grid(row=0,column=2, sticky= N+S+E, rowspan=2)    
    can.config(xscrollcommand=scrollx.set)          

# Frame fr2 created om the canvas , holding widgets
#----------------------------------------------------------------------------------------------------------------------------------------------------------        
    font=fonts
    om1 = OptionMenu(can.fr2, var1, '1', '2', '3')
    lbl = Label(can.fr2, text= content[0], justify = 'left', font=fonts)
    lbl1 = Label(can.fr2, text= 'Hello', font=fonts)
    lbl2 = Label(can.fr2, text= content[1], justify = 'left', font=fonts)
    lbl.grid(row=0, column=0, padx = 15)
    lbl1.grid(row=0, column=1, padx = 15)
    om1.grid(row=0, column=2, padx = 15)
    lbl2.grid(row=0, column=3, padx = 15)
    var1_a= StringVar()
    var1_a.set('A')
    om1_a = OptionMenu(can.fr2, var1_a, 'A', 'B', 'C')    
    lbl_a = Label(can.fr2, text= content[0], justify = 'left', font=fonts)
    lbl1_a = Label(can.fr2, text= 'Hello', font=fonts)
    lbl2_a= Label(can.fr2, text= content[1], justify = 'left', font=fonts)
    lbl_a.grid(row=1, column=0, padx = 15)
    lbl1_a.grid(row=1, column=1, padx = 15)
    om1_a.grid(row=1, column=2, padx = 15)
    lbl2_a.grid(row=1, column=3, padx = 15)

    can.fr2.m1=can.create_window(0,0, window= can.fr2, anchor = 'nw')
    print can.coords(can.fr2.m1)
    can.config(yscrollcommand=scrolly.set)          
    can.xview(MOVETO, 0.0)
    can.yview(MOVETO, 1.0)
    can.fr2.update_idletasks()
    can.update_idletasks()    
    
    can.config(scrollregion=(0,0,can.winfo_width(),max(can.winfo_height(), can.fr2.winfo_height())))    
    can.grid_propagate(0)
    can.update_idletasks()    
    
    
    #Menu button and radiobuttons for font change
    #---------------------------------------------------
    fr_menu_but=Menubutton(fr1, text="Optionen", font = fonts , underline=0)
    fr_menu_but.menu = Menu(fr_menu_but, tearoff=0)
    fr_menu_but.menu.font  = Menu(fr_menu_but.menu, tearoff=0)
    rval = IntVar()
    rval.set(2)
    winsize = ['Small','Medium','Big']
    for i,x in enumerate(winsize):
        fr_menu_but.menu.font.add_radiobutton(label=x, font = fonts, var= rval, val=i+1, command = (lambda: fontctrl(rval.get(),fonts,root,can.fr2,can,fr1)))

    fr_menu_but.menu.add_cascade(label="Schrift-Groesse", font = fonts, menu=fr_menu_but.menu.font, underline=0)
    fr_menu_but['menu'] = fr_menu_but.menu
    fr_menu_but.update_idletasks()
    fr_menu_but.grid(row=0, column=0)

    fontctrl(rval.get(),fonts,root,can.fr2,can,fr1)
    root.update_idletasks()



#MAIN ROUTINE
#------------------------------------------    
global content
content=[  '/xxx/yyyyyy/aaa/bbbb/tttttt/rrrrrrrr/',
        '/xxx/yyyyyy/aaa/bbbb/tttttt/rrrrrrrr/',
        '/xxx/yyyyyy/aaa/bbbb/tttttt/rrrrrrrr/',
        '/xxx/yyyyyy/aaa/bbbb/tttttt/rrrrrrrr/']

root= Tk()
root.tk.call('tk', 'scaling', 1)
fr1= Frame(root, width= 900, height= 600, bg='red')
fr1.grid(row=0,column=0, sticky='news')
fr1.grid_propagate(0)
window2(fr1,root)
root.mainloop()    

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Wayne Watson | 7 Apr 2009 12:12
Picon
Favicon

Re: Default Tkinter Structure of a 640x480 PIL BMPFile?

I downloaded the tar.gz file to Win and tried to open the hmtl and css(?) files there. The css file shows a tangle of words and characters. The html file I tried produces an invalid page.

Igor Novikov wrote:
If you need to change Imaging object directly or create it from sсratch such way requires low level programming, i.e. either
C-extension or ctypes  module usage. Another way is standard PIL API usage. The API is a python wrapper for Imaging
objects and according processing methods. I think your issue can be resolved by usual PIL API without low level tricks.
Detailed PIL html docs you can download here:

http://sk1project.org/downloads/PIL.tar.gz

I hope this helps.

On Thu, Apr 2, 2009 at 4:53 AM, Wayne Watson <sierra_mtnview <at> sbcglobal.net> wrote:
Yes, three items, format, memory, etc. That's not the issue.
 
My question was directed specifically to your comment about Imaging.h. Imaging.h looks like a C-program header file. I use Python with Windows XP. Where do I look in Python to find the equivalent of Imaging.h.

I think my answer requires a post to the PIL mail list.

Igor Novikov wrote:
Sorry you have mixed in question three different instances: BMP, PIL and Tkinter.
PIL can works without Tkinter. So PIL image objects don't depend on Tkinter.
But PIL can generates tcl/tk image objects for UI use cases.
BMP is a storage format. It's just an image file but not an image object in memory.
So please clarify your question. Which information you need or which code you
wish implementing?
 

On Wed, Apr 1, 2009 at 11:29 PM, Wayne Watson <sierra_mtnview <at> sbcglobal.net> wrote:
I'm using Win Python, and have some small familiarity with library compents. How do I find Imaging.h?


Igor Novikov wrote:
Hi Wayne,

I think you can find an answer in PIL source code. Take look at Imaging.h
The header contains Imaging object definition. Loaded image is not BMP, PNG, TIFF
or any other storage format because it's impossible to process image in memory
using storage format structure (for example, they often use compression).

Sincerely,

Igor Novikov
sK1 Project
http://sk1project.org

2009/4/1 Wayne Watson <sierra_mtnview <at> sbcglobal.net>
Thanks, but there seem to be an unending # of mail lists for Python.
I've rummaged around the link before you gave, but zippo. I just tried this on Google:

bmp bits site:http://www.pythonware.com/library/pil/handbook/index.htm

It searches the entire site. Zippo again.

I guess it's another mail list to join.

Whoops, this a better search:
bmp bits site: http://www.pythonware.com/library/pil/

Nothing of interest. Well, maybe I stuck in 24 and one hit discusses decoder.

Michael O'Donnell wrote:
Dear Wayne, Probably better directed at the PIL/Image list: http://mail.python.org/mailman/listinfo/image-sig In any case a BMP file has a structure independent of the software which reads it, do a google for bmp to find information on it. Once an image is loaded into PIL, PIL offers methods to access the image. See PIL documentation for these methods: http://www.pythonware.com/library/pil/handbook/index.htm Mick 2009/4/1 Wayne Watson <sierra_mtnview <at> sbcglobal.net>:
See Subject. Does it have a header, DIB,  palette, and data section? What is the default depth? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss



--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake


--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the production in solar energy from 1% to 2% of the total energy supply in the next few years. One nuclear reaction would do the same. Heard on Bill Wattenburg, KGO-AM "Less than all cannot satisfy Man." -- William Blake


--
Signature.html Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) "Less than all cannot satisfy Man." -- William Blake
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Gmane