Is there a way to scale the size of an image with perl Tk? I tried passing the -height and/or -width options to Photo(), but when I display it with Label() it just shows a chunk of the image, not the whole thing, and not scaled at all.
$mw->Photo("image1", -data => $imgdata{'image1'}, -height = 200);
$mw->Label(-image => "image1")->pack();
Is there a way to do this in Tk, or do I have to scale the image myself with Image Magick or GD? I thought that being able to scale the image would save alot of time as opposed to creating several versions of the image in different sizes.
Thank you!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.