From: keithv on 2 Jul 2010 07:59 I'm having two big problems with the Img package, and was wondering if these are known bugs or problems with my installation. The first problem is that it won't display png images--they just show up blank. The second is trying to take screen snapshot with "-data $window". When I do, it's either blank or only about half the image. I'm using Img 1.4 with ActiveState Tcl 8.5.8 on 64-bit Windows 7. If this is an installation problem, how do I use teacup to replace it? Thanks, Keith
From: Andreas Kupries on 9 Jul 2010 01:01 keithv <kvetter(a)gmail.com> writes: > I'm having two big problems with the Img package, and was wondering if > these are known bugs or problems with my installation. > > The first problem is that it won't display png images--they just show > up blank. > > The second is trying to take screen snapshot with "-data $window". > When I do, it's either blank or only about half the image. > > I'm using Img 1.4 with ActiveState Tcl 8.5.8 on 64-bit Windows 7. > > If this is an installation problem, how do I use teacup to replace it? teacup help => teacup help cmds-by-group | Use 'help <commandname>' to get detailed help for a command. | | == Package management - Use == | | teacup install Get and install a package found in an archive or file | teacup remove Remove installed packages => teacup help remove After removal just reinstall. Alternatively teacup help install should point the option --force, which will install the package even if existing, overwriting whatever you have with whatever is in the repository. -- So long, Andreas Kupries <akupries(a)shaw.ca> <http://www.purl.org/NET/akupries/> Developer @ <http://www.activestate.com/> -------------------------------------------------------------------------------
From: Gerhard Reithofer on 9 Jul 2010 11:13 Hi Keith and *, On Thu, 8 Jul 2010, Andreas Kupries wrote: > keithv <kvetter(a)gmail.com> writes: > > > I'm having two big problems with the Img package, and was wondering if > > these are known bugs or problems with my installation. > > > > The first problem is that it won't display png images--they just show > > up blank. this sounds like the behavior I saw and described in my (huge!) ActiveTcl/Tablelist thread. > > The second is trying to take screen snapshot with "-data $window". > > When I do, it's either blank or only about half the image. .... > > I'm using Img 1.4 with ActiveState Tcl 8.5.8 on 64-bit Windows 7. > > > > If this is an installation problem, how do I use teacup to replace it? .... Keith, could you please check if my test script (which I posted in my last message) works in your environment? Here's the script again: ################################################# puts "Tcl/Tk [package require Tk]" puts "img::png [package require img::png]" set imgdata(png) "iVBORw0KGgoAAAANSUhEUgAAAA4AAAAKCAYAAACE2W/HAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\ AAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAFkSURB\ VCiRnY4/S1thGMV/z3vfXJNGUjs4SCgWweigxhauQaRFYhEEoYiLg5MgLiLo5tB+gw79EJ3chH6A\ +Ae9Ri0p0q0UF7GICjai3uQ+r0sIgrh44Ezn/A5HnHMA5IPCu9akXVXn3qu677c1/VophyfDH0a/\ 3EXRZxo9AJtInNoG1NaSMBuzxWyq/03GrO+eLm79vhgDBj1rB5YX5u34x2ITnPg03WEAPCNzQ7k2\ Mz3SYXLZNCtTXb4R6c4HhbcA1nr4vt80gAUQ4UXS95qLIoJvjQJJnNPS5rb29vSYKIrYPzhEVY3N\ B4XXwMHm0bkEuZf0dWZYD//pTRRfAu5/tfptJ9xr+Vn5NWlEzupxvOac25GBYPgcIYODlC9eVIvF\ 84xGMYoDRP6g9YXWdHqpen09WymHN42rmknkZqyk2omBxmHjg9GrY+p/f7yqlMMSUOKBDM/Us0EL\ QFyD+O5xqrUnwXsC0n5niE5C8QAAAABJRU5ErkJggg==" set res [catch {image create photo pngimg -data $imgdata(png)} result] puts "res=$res\nesult: $result\nerrorCode: $errorCode\nerrorInfo: $errorInfo" pack [label .l -image pngimg] ################################################# -- Gerhard Reithofer Tech-EDV Support Forum - http://support.tech-edv.co.at
From: keithv on 9 Jul 2010 12:58 On Jul 9, 11:13 am, Gerhard Reithofer <gerhard.reitho...(a)tech- edv.co.at> wrote: > Hi Keith and *, > > On Thu, 8 Jul 2010, Andreas Kupries wrote: > > keithv <kvet...(a)gmail.com> writes: > > > > I'm having two big problems with the Img package, and was wondering if > > > these are known bugs or problems with my installation. > > > > The first problem is that it won't display png images--they just show > > > up blank. > > this sounds like the behavior I saw and described in my > (huge!) ActiveTcl/Tablelist thread. > > > Keith, could you please check if my test script (which I posted in my > last message) works in your environment? > > Here's the script again: > ################################################# > puts "Tcl/Tk [package require Tk]" > puts "img::png [package require img::png]" > > set imgdata(png) "iVBORw0KGgoAAAANSUhEUgAAAA4AAAAKCAYAAACE2W/HAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\ > AAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAFkSURB\ > VCiRnY4/S1thGMV/z3vfXJNGUjs4SCgWweigxhauQaRFYhEEoYiLg5MgLiLo5tB+gw79EJ3chH6A\ > +Ae9Ri0p0q0UF7GICjai3uQ+r0sIgrh44Ezn/A5HnHMA5IPCu9akXVXn3qu677c1/VophyfDH0a/\ > 3EXRZxo9AJtInNoG1NaSMBuzxWyq/03GrO+eLm79vhgDBj1rB5YX5u34x2ITnPg03WEAPCNzQ7k2\ > Mz3SYXLZNCtTXb4R6c4HhbcA1nr4vt80gAUQ4UXS95qLIoJvjQJJnNPS5rb29vSYKIrYPzhEVY3N\ > B4XXwMHm0bkEuZf0dWZYD//pTRRfAu5/tfptJ9xr+Vn5NWlEzupxvOac25GBYPgcIYODlC9eVIvF\ > 84xGMYoDRP6g9YXWdHqpen09WymHN42rmknkZqyk2omBxmHjg9GrY+p/f7yqlMMSUOKBDM/Us0EL\ > QFyD+O5xqrUnwXsC0n5niE5C8QAAAABJRU5ErkJggg==" > > set res [catch {image create photo pngimg -data $imgdata(png)} result] > puts "res=$res\nesult: $result\nerrorCode: $errorCode\nerrorInfo: $errorInfo" > pack [label .l -image pngimg] > ################################################# Yes, this fails for me also. Actually the image create doesn't throw an error, it just doesn't create the image. My work around, until I try Andreas solution, is that I installed pixane and a simple 'package require pixane' makes img::png work. Keith
From: keithv on 9 Jul 2010 13:10
On Jul 9, 12:58 pm, keithv <kvet...(a)gmail.com> wrote: > On Jul 9, 11:13 am, Gerhard Reithofer <gerhard.reitho...(a)tech- > > > > edv.co.at> wrote: > > Hi Keith and *, > > > On Thu, 8 Jul 2010, Andreas Kupries wrote: > > > keithv <kvet...(a)gmail.com> writes: > > > > > I'm having two big problems with the Img package, and was wondering if > > > > these are known bugs or problems with my installation. > > > > > The first problem is that it won't display png images--they just show > > > > up blank. > > > this sounds like the behavior I saw and described in my > > (huge!) ActiveTcl/Tablelist thread. > > > Keith, could you please check if my test script (which I posted in my > > last message) works in your environment? > > > Here's the script again: > > ################################################# > > puts "Tcl/Tk [package require Tk]" > > puts "img::png [package require img::png]" > > > set imgdata(png) "iVBORw0KGgoAAAANSUhEUgAAAA4AAAAKCAYAAACE2W/HAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\ > > AAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAFkSURB\ > > VCiRnY4/S1thGMV/z3vfXJNGUjs4SCgWweigxhauQaRFYhEEoYiLg5MgLiLo5tB+gw79EJ3chH6A\ > > +Ae9Ri0p0q0UF7GICjai3uQ+r0sIgrh44Ezn/A5HnHMA5IPCu9akXVXn3qu677c1/VophyfDH0a/\ > > 3EXRZxo9AJtInNoG1NaSMBuzxWyq/03GrO+eLm79vhgDBj1rB5YX5u34x2ITnPg03WEAPCNzQ7k2\ > > Mz3SYXLZNCtTXb4R6c4HhbcA1nr4vt80gAUQ4UXS95qLIoJvjQJJnNPS5rb29vSYKIrYPzhEVY3N\ > > B4XXwMHm0bkEuZf0dWZYD//pTRRfAu5/tfptJ9xr+Vn5NWlEzupxvOac25GBYPgcIYODlC9eVIvF\ > > 84xGMYoDRP6g9YXWdHqpen09WymHN42rmknkZqyk2omBxmHjg9GrY+p/f7yqlMMSUOKBDM/Us0EL\ > > QFyD+O5xqrUnwXsC0n5niE5C8QAAAABJRU5ErkJggg==" > > > set res [catch {image create photo pngimg -data $imgdata(png)} result] > > puts "res=$res\nesult: $result\nerrorCode: $errorCode\nerrorInfo: $errorInfo" > > pack [label .l -image pngimg] > > ################################################# > > Yes, this fails for me also. Actually the image create doesn't > throw an error, it just doesn't create the image. > > My work around, until I try Andreas solution, is that I installed > pixane and a simple 'package require pixane' makes img::png work. I just fixed the png problem with: teacup remove Img teacup remove img::png teacup install img::png teacup install Img Still can't get screen snapshot with "-data $window" working. I tried reinstalling img::window but that didn't work. Keith |