Chapter 17. Images and Animations

In its early days, Tk pictures were limited to X11 bitmaps (XBMs), a two-color text-based format that let us enhance Labels and Buttons with simple drawings in place of plain text strings. XBM support still exists, but these days, we think in terms of images. Perl/Tk supports numerous image types, which may be further classified into distinct image formats. An image is an object in its own right, meaning it must be created before it can be used, has methods that manipulate it, and should be destroyed when we are through with it.

This chapter discusses the various image flavors and how we might use them, either as static pictures or dynamic animations.

Get Mastering Perl/Tk now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.