Image - Online Linux Manual Page

Section : 3pm
Updated : 2020-11-09
Source : perl v5.32.0
Note : User Contributed Perl Documentation

NAMETk::Image − Create and manipulate images

SYNOPSIS$image = $widget>type(?arg arg ...?) $image>method(?arg arg ...?)

DESCRIPTIONThe image constructors and methods are used to create, delete, and query images. It can take several different forms, depending on the ​type. The constructors require a $widget to invoke them, this is used to locate a MainWindow. (This is because the underlying Tk code registers the images in the data structure for the MainWindow.) The legal forms are: $widget>type?(?name?,?option=>value ...)Creates a new image and returns an object. ​type specifies the type of the image, which must be one of the types currently defined (e.g., Bitmap). ​name specifies the name for the image; if it is omitted then Tk picks a name of the form imagex, where x is an integer. There may be any number of option=>value pairs, which provide configuration options for the new image. The legal set of options is defined separately for each image type; see below for details on the options for built-in image types. If an image already exists by the given name then it is replaced with the new image and any instances of that image will redisplay with the new contents. $image>delete Deletes the image $image and returns an empty string. If there are instances of the image displayed in widgets, the image won't actually be deleted until all of the instances are released. However, the association between the instances and the image manager will be dropped. Existing instances will retain their sizes but redisplay as empty areas. If a deleted image is recreated (with the same name) the existing instances will use the new image. $image>height Returns a decimal string giving the height of image name in pixels. $image>inuse Returns a boolean value indicating whether or not the image is in use by any widgets. $widget>imageNames Returns a list containing all existing images for $widget's ​MainWindow. $image>type Returns the type of $image (the value of the type method when the image was created). $widget>imageTypes Returns a list whose elements are all of the valid image types (i.e., all of the values that may be supplied for the type to create an image). $image>width Returns a decimal string giving the width of image name in pixels.

BUILT-IN IMAGE TYPESThe following image types are defined by Tk so they will be available in any Tk application. Individual applications or extensions may define additional types. Bitmap Each pixel in the image displays a foreground color, a background color, or nothing. See Tk::Bitmap for more information. Pixmap Pixmap is slightly more general than Bitmap, each pixel can be any available color or transparent (rendered as background color of the widget image is displayed in). Pixmap is best used for icons and other simple graphics with only a few colors. Pixmap is derived from Tix. See Tk::Pixmap for more information. Photo Displays a variety of full-color images, using dithering to approximate colors on displays with limited color capabilities. See Tk::Photo documentation for more information.

CAVEATSIt's necessary to use the delete method to delete an image object and free memory associated with it. Just using a lexical variable for storing the image object and letting the variable to go out of scope or setting to undef is not sufficient.

SEE ALSOTk::Bitmap Tk::Pixmap Tk::Photo

KEYWORDSheight, image, types of images, width
0
Johanes Gumabo
Data Size   :   15,323 byte
man-Tk::Image.3pmBuild   :   2025-03-22, 13:26   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   14 / 1,208,780
Visitor ID   :     :  
Visitor IP   :   3.145.38.89   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 25.03.22
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36


Very long time ago, I have the best tutor, Wenzel Svojanovsky. If someone knows the email address of Wenzel Svojanovsky, please send an email to johanesgumabo@gmail.com.
Help me, linux0001.com will expire on July 16, 2025. I have no money to renew it. View detail

If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|254|Tk::Image.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|160|Tk::Image.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|254|Tk::Image.3pm|43|br══─}─══|'br══─}─══ )         (htmlprn|160|Tk::Image.3pm|43|'br══─}─══ |'br══─}─══ )