compatible image type

2008-07-04 Thread gordon
=pathname) and display it on a canvas. the extn can be anything ..even zip or bat ,doc whatever depending on user selection...I want to put someway to raise an error message to the user if he selects a file with extension not of a compatible image type for PhotoImage.How should i do this? should i

Re: compatible image type

2008-07-04 Thread Marc 'BlackJack' Rintsch
message to the user if he selects a file with extension not of a compatible image type for PhotoImage.How should i do this? should i check 'extn' to a list of compatible image type extensions(something like [''jpg','jpeg','png','gif'...] ) or is there a better way? Just catch the exception

Re: compatible image type

2008-07-04 Thread Larry Bates
ImageTk.PhotoImage(file=pathname) and display it on a canvas. the extn can be anything ..even zip or bat ,doc whatever depending on user selection...I want to put someway to raise an error message to the user if he selects a file with extension not of a compatible image type for PhotoImage.How should i do