png template processing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akilageethal
    New Member
    • Oct 2007
    • 6

    png template processing

    I want to get a png template processed . I am trying to call a CGI script to process the template . for the image url iam giving the CGI script path.


    [% imageurl = BLOCK %]bugsummeryperio d.cgi?[% urlquerypart FILTER html %]&type=4&amp ;

    here iam trying to change the variable 'type ' and call the cgi script. In the cgi script i have a conditional statement for
    type ==4


    [code=perl]
    }elsif( $cgi->param('type' ) == 4)
    {

    $vars->{'data'} = \@data;
    $template->process("summe ry/report-line1.png.tmpl" , $vars)
    || ThrowTemplateEr ror($template->error());
    }
    [/code]


    now i think still the cgi script is not getting called. What can be the error??
    Last edited by numberwhun; Oct 29 '07, 11:36 AM. Reason: add code tags
  • eWish
    Recognized Expert Contributor
    • Jul 2007
    • 973

    #2
    What errors are you getting? Also, what templating system are you using?

    Comment

    • akilageethal
      New Member
      • Oct 2007
      • 6

      #3
      Originally posted by eWish
      What errors are you getting? Also, what templating system are you using?


      I am not getting any compilation errors. But the graph is not displayed in the page. I think still the png template is not processed.

      Comment

      • eWish
        Recognized Expert Contributor
        • Jul 2007
        • 973

        #4
        I am not sure what your ThrowTemplateEr ror routine looks like. Therefore, I would bypass it for the moment and see if you can get it to complain.

        Change this:
        [CODE=perl]|| ThrowTemplateEr ror($template->error());[/CODE]
        To:
        [CODE=perl] || die $template->error();[/CODE]
        Also, is the file name correct? Is it an image or a template page you are wanting to view?

        Comment

        • akilageethal
          New Member
          • Oct 2007
          • 6

          #5
          Originally posted by eWish
          I am not sure what your ThrowTemplateEr ror routine looks like. Therefore, I would bypass it for the moment and see if you can get it to complain.

          Change this:
          [CODE=perl]|| ThrowTemplateEr ror($template->error());[/CODE]
          To:
          [CODE=perl] || die $template->error();[/CODE]
          Also, is the file name correct? Is it an image or a template page you are wanting to view?


          In the cgi script iam calling the html template.. in that for the imageurl i hav given the path to the cgi script again and process a png template.. Iam getting the html template. png image is not displayed. Cnnot fing why? And also is their any alternative method to do that.. In a html template iwant to display the png graph. How can i include that in to the html template..

          Comment

          • eWish
            Recognized Expert Contributor
            • Jul 2007
            • 973

            #6
            Your png, is it transparent by chance. If so, are you using a browser like Internet Explorer to view it?

            Have you searched CPAN for a module to aide in building your graph?

            Comment

            Working...