in reply to Re: pod and images
in thread pod and images
I was interested and fiddled abou it. And this seems to work without any extra podparser.
Download this code to pod_img.pl
and callfor (1.10) { print; } =for html <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAY +AAAAeP4ixAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAA +CxMBAJqcGAAAAAd0SU1FB9gEEgIJDgjXTxYAAAE3SURBVGje7VhBDsMwCAPU/3+ZXbdKC +RDMlLRwjJBqg4lpWFWVioOZqz9BQg+JxxC5bhKAaWAkWVVloGS1pXWEtKJSYfB19C2VqB +QlqXetJDE7DxOxwCLIWGA9ZAQBMkPGW3Er7/m3VrTKK13xdsOT3z5yDJGoR6x4SnRdmeW +/Q1reKmcc3tsVK0+yIBFrigXSQ1YyFQev/Zzp2FU5zNXD3z6yc3C/orS0mshcvkRUPiN/ +GMOW1nbx4+xKwFdAGvzNMeHuYqV+aTxDWlGpIKV4l0pUipLR+3AOUCRm5+EfKwMshIwF1 +kFGECBTZJwVt/Je8BwUrPJSVzS4Hk3y20eOIRL1iCVPia4rk/x3SMtb5ZTDe7ti5EkWJG +RNscg4yEqm4tBdawTW2bGrdJirh799ZOPoV5Td4gPKYZdm2PperwAAAABJRU5ErkJggg= +=" title="img-tag, normal" alt="Inlineimage"> print "dummycode";
the resulting html-file shows an image in most modern browsers! (Officially also in IE7, but I couldn't test it! So please tell me if ...)pod2html pod_img.pl >pod_img.html
PLEASE NOTE: The image data is in one long line, the linebreaks were inserted by the perlmonks-formatter.
Cheers Rolf
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Inline images in POD
by dpchrist (Initiate) on Nov 17, 2011 at 04:12 UTC | |
by Anonymous Monk on Nov 17, 2011 at 07:41 UTC | |
by afoken (Chancellor) on Nov 18, 2011 at 10:57 UTC | |
by LanX (Saint) on Nov 17, 2011 at 22:53 UTC |
In Section
Seekers of Perl Wisdom