Mageia Bugzilla – Attachment 6155 Details for
Bug 12596
Failure of some of the tk image handlers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Tcl script to expose PNG image error
showpng.tcl (text/x-tcl), 706 bytes, created by
Len Lawrence
on 2015-03-29 04:52:25 CEST
(
hide
)
Description:
Tcl script to expose PNG image error
Filename:
MIME Type:
Creator:
Len Lawrence
Created:
2015-03-29 04:52:25 CEST
Size:
706 bytes
patch
obsolete
>package require Tk >package require Img > >wm title . "Loch Lubnaig" >set loch "/home/lcl/tcl/LochLubnaig.png" >set image_parameters [ exec identify $loch ] >set dimensions [ lindex $image_parameters 2 ] >set last [ string length $dimensions ] >set last [ expr { $last - 1 } ] >set j [ string first x $dimensions ] >set width [ string range $dimensions 0 [ expr { $j-1 } ] ] >set height [ string range $dimensions [ expr { $j+1 } ] $last ] >set view [ image create photo -file $loch ] >set x [ expr { 10 + [expr { $width / 2 }] } ] >set y [ expr { 10 + [expr { $height / 2 }] } ] >tk::canvas .lake -background grey22 -height [expr {$height+20}] -width [expr {$width+20}] >.lake create image $x $y -image $view >pack .lake
package require Tk package require Img wm title . "Loch Lubnaig" set loch "/home/lcl/tcl/LochLubnaig.png" set image_parameters [ exec identify $loch ] set dimensions [ lindex $image_parameters 2 ] set last [ string length $dimensions ] set last [ expr { $last - 1 } ] set j [ string first x $dimensions ] set width [ string range $dimensions 0 [ expr { $j-1 } ] ] set height [ string range $dimensions [ expr { $j+1 } ] $last ] set view [ image create photo -file $loch ] set x [ expr { 10 + [expr { $width / 2 }] } ] set y [ expr { 10 + [expr { $height / 2 }] } ] tk::canvas .lake -background grey22 -height [expr {$height+20}] -width [expr {$width+20}] .lake create image $x $y -image $view pack .lake
View Attachment As Raw
Actions:
View
Attachments on
bug 12596
: 6155 |
6444
|
6452