in reply to Outputing image in perl script/cgi

> My problem is that I also output html/text content.

???

I suppose you are aware of the img tag and your problem is that the image data is generated dynamically.

The classic answer is either to statically store the image or to link in the image src url to a second cgi call requesting the image.

An alternative with "new" browsers is base64 encoding of an inlined image.

(Not really a perl question)

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^2: Outputing image in perl script/cgi
by kepler (Scribe) on Nov 08, 2015 at 13:48 UTC
    Hi. I understand. But my image generates this: ÿØÿá :/ ...
      What is the question?

      What did you try?

      What did you get?

      What do you want to get?

      Please try to phrase posts which can be answered without semi telepathic guessing.

      It might probably and under some circumstances be (i.e. let's suppose) that you want to google for "base64 and perl" but I'm not going to do it for you if you don't even show any efforts in expressing your problem.

      Our maybe not? Who knows?

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!

      A reply falls below the community's threshold of quality. You may see it by logging in.
      If your image is generating high-bit characters, then you aren't encoding it in base64. MIME::Base64

      #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.