Thanks for your quick response!

I tried it but i still get an internal server error

#!/usr/local/bin/perl use GD; use CommonSubs; $user = $ENV{'REMOTE_USER'}; %availableCards = ("card1" => "/tech/performance-culture +/rewards/images/ecards-master/large_card_1.png", "card2" => "/tech/p +erformance-culture/rewards/images/ecards-master/large_card_2.png", "card3" => "/tech/p +erformance-culture/rewards/images/ecards-master/large_card_3.png", "card4" => "/tech/p +erformance-culture/rewards/images/ecards-master/large_card_4.png", "card5" => "/tech/p +erformance-culture/rewards/images/ecards-master/large_card_5.png", "card6" => "/tech/p +erformance-culture/rewards/images/ecards-master/large_card_6.png", "card7" => "/tech/p +erformance-culture/rewards/images/ecards-master/large_card_7.png", "card8" => "/tech/p +erformance-culture/rewards/images/ecards-master/large_card_8.png", "card9" => "/tech/p +erformance-culture/rewards/images/ecards-master/large_card_9.png"); $cardToUse = $availableCards{'card7'}; $text = "Hello Cy,\nGreat job! You are an asset to Cisco\nand your org +anization.\nRegards,\nCarlo"; @lines = split(/\n/, $text); $lCnt .= $#lines+1; $lineStart = 80; $lineHeight = 24; $container = "/opt/httpd/root-wwwin/htdocs".$cardToUse; $font = "/opt/httpd/root-wwwin/data-priv-shared/ops/web/LPG/templ/verd +ana.ttf"; $image = GD::Image->newFromPng($container,1); $txtColor = $image->colorResolve(0,0,0); for ($i=0; $i<$lCnt; ++$i){ $xPos = 375; $yPos = $lineStart + ($lineHeight*$i); @bounds = $image->stringTTF($txtColor,$font,13,0,$xPos,$yPos,@line +s[$i]); } $ts = time(); $imgFile = "ecard_".$user."_".$ts.".png"; open(IMGFILE, ">/opt/httpd/root-wwwin/data-shared/tech/artg/cust-touch +/videos/$imgFile"); binmode IMGFILE; print IMGFILE $image->png; close (IMGFILE); $img = "<img border=0 src=\"/data-shared/tech/artg/cust-touch/videos/$ +imgFile\" />"; print "Content-type: text/html\n\n"; print "$img";

In reply to Re^2: GD:image resolution issue by matua105
in thread GD:image resolution issue by matua105

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.