my $im = new GD::Image(710,$Image_Height); my $white = $im->colorAllocate(255,255,255); my $black = $im->colorAllocate(0,0,0); my $blue = $im->colorAllocate(0,0,255); $im->transparent($white); $im->interlaced('true'); $im->filledRectangle($Trans_X1,$Image_Height-20,$Trans_X1,$Image_Height-10,$scale_line); ### Scale ###### $im->filledRectangle($Trans_X1+$Scale_Length,$Image_Height-20,$Trans_X1+$Scale_Length,$Image_Height-10,$scale_line); ### Scale ###### $im->string(gdSmallFont,$Trans_X1,$Image_Height-32,1,$scale_line); $im->string(gdSmallFont,$Trans_X1+$Scale_Length,$Image_Height-32,$Length,$scale_line); open OUT,">$ID.png"; binmode OUT; # Convert the image to PNG and print it on standard output print OUT $im->png; close OUT;