#!/usr/bin/perl use strict; use URI; use GD; my $img = GD::Image->new(100,100); my $red = $img->colorAllocate(255,0,0); my $blue = $img->colorAllocate(0,0,255); $img->rectangle(40,40,59,59,$blue); my $uri = URI->new("data:"); $uri->media_type("image/png"); $uri->data($img->png); print "Content-type:text/html\n\n"; print "\n"; print "
##
Content-type:text/html
Testing inline image data