Tcl Tk
Advanced Search
Home
Manuel
Links
Faq
Submit a tcl/tk Reference
Contact Us
Some examples tcl/tk codes
Man of Bwidget
Man of blt
mkwidget screenshots
TkOgl
Video Demo real.
The source of theses pages is the excellent
Tcl/Tk Quick Reference Guide
.
I apologize , because there're some tex commands in the text,
if you see some error please send me an email
The photo Image Type
Command:
photo
-channel
channelId
Specifies image data should be read from channel
channelId
.
-data
string
Specify contents of image in a supported format.
-format
formatName
Specify format for data specified with the -channel, -data or -file options. In standard Tk, the GIF/PGM/PPM formats are supported.
-file
fileName
Specifies image data should be read from file
fileName
.
-height
number
Specifies pixel height of the image.
-palette
paletteSpec
Set the resolution of the color cube to be allocated for image.
-width
number
Specifies pixel width of the image.
imageName
blank
Blanks the image so has no data and is completely transparent.
imageName
copy
sourceImage
[
option value ...
] Copy a region from
sourceImage
to
imageName
using given options.
-from
x1 y1 x2 y2
Specifies rectangular region of source image to be copied.
-to
x1 y1 x2 y2
Specifies rectangular region of target image to be affected.
-shrink Will clip target image so copied region is in bottom-right corner.
-zoom
x y
Magnifies source region by
x y
in respective direction.
-subsample
x y
Reduces source image by using only every
x y
th pixel.
imageName
get
x y
Returns RGB value of pixel at coords
x y
as list of three integers.
imageName
put
data
[-to
x1 y1 x2 y2
] Sets pixels values for the region
x1 y1 x2 y2
for 2-D array
data
.
imageName
read
fileName
[
option value ...
] Reads image data from file
fileName
into image using given options.
-format
format-name
Specifies image format of file.
-from
x1 y1 x2 y2
Specifies a rectangular region of the image file to copy from.
-shrink Will clip image so copied region is in bottom-right corner.
-to
x y
Specifies coords of the top-left corner in image to copy into.
imageName
redither
Redither the image.
imageName
write
fileName
[
option value ...
] Writes image data from image into file
fileName
.
-format
format-name
Specifies image format for the file.
-from
x1 y1 x2 y2
Specifies a rectangular region of the image to copy from.
The source of theses pages is the excellent
Tcl/Tk Quick Reference Guide
.