Hello! I wrote a simple PerlTk script and after finishing the functionality I decided to change the icon. So I downloaded a 512x512 PNG file, the beginning of the GUI part of the script looke like:
my $gui_mw_wrapper = new MainWindow; $gui_mw_wrapper -> geometry("1000x1000"); my $icon = $gui_mw_wrapper -> Photo(-width => 32, -height => 32, -f +ile => '<absolute path>/code-terminal_15180865.png', -format => 'png' +); $gui_mw_wrapper -> iconimage($icon);
and when I run it, the icon is a blank square (as opposed to default PerlTk icon which shows when I comment the 2 last line of sample). After some reading I saw an advice to have the image the same size as "-width"/"-height" values so I opened GIMP, resized the image to 32x32, changed the file path line to:
my $icon = $gui_mw_wrapper -> Photo(-width => 32, -height => 32, -f +ile => '/nas/users/arie/bin/icons/code-terminal_15180865_32x32.png', +-format => 'png');
and got the same result. So, what am I doing wrong? TIA!

In reply to PerlTk GNOME3 alternate icon file shown as blank square by kaza_perl_ip

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.