[Image-SIG] ImageTk.PhotoImage vs. Tkinter.PhotoImage
email@example.com (Les Schaffer)
Mon, 27 Sep 1999 16:55:52 -0400 (EDT)
i need to zoom in on a user specified subset of an image.
but i am confussed about ImageTk.PhotoImage and
Tkinter.PhotoImage. the former creates an instance of the latter in
its self.__photo, used for pasting. but i need access to
Tkinter.Photoimage's copy and zoom commands. i dont understand why
ImageTk.PhotoImage doesnt just extend Tkinter.PhotoImage so the copy
and zoom methods are available, or delegate those calls to __photo
also, i notice that in Tkinter.PhotoImage the -from and -to keywordd
for the image create methods are not explicitly defined. wonder
this is my first real foray into using tkinter/PIL for some astro
work, so please excuse if my questions are stupid.
so, with code like this:
self.photo = ImageTk.PhotoImage(image)
self.canvas.create_image(0, 0, image=self.photo, anchor=NW)
i want to create a new PhotoImage consisting of a zoom in on a subset
of self.photo (i have the x,y coords of the desired zoom area in
____ Les Schaffer ___| --->> Engineering R&D <<---
Theoretical & Applied Mechanics | Designspring, Inc.
Center for Radiophysics & Space Research | http://www.designspring.com/
Cornell Univ. firstname.lastname@example.org | email@example.com