透過PNG 1px C/perl string

これに5かいくらいお世話になってる。
透過GIF 1px・Base64 - 8時40分が超えられない - subtech

Cとかperlに埋め込むための1pxPNG文字列。

\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x01\x00\x00\x00\x01\x01\x03\x00\x00\x00\x25\xdb\x56\xca\x00\x00\x00\x06\x50\x4c\x54\x45\xff\xff\xff\x00\x00\x00\x55\xc2\xd3\x7e\x00\x00\x00\x02\x74\x52\x4e\x53\x00\xff\x5b\x91\x22\xb5\x00\x00\x00\x0a\x49\x44\x41\x54\x08\x99\x63\x60\x00\x00\x00\x02\x00\x01\xf4\x71\x64\xa6\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82

これで作った。\xNNのあとにたまたま数字が来てるとだめみたいなのでめんどくなって全部エスケープ。

sub e {
    my $c = shift;
    my $n = ord $c;

#    if ( $n >= 0x20 and $n < 0x80 and $c ne '"' and $c ne '\\') {
  #      $c;
 #   } else {
        sprintf "\\x%02x", $n;
   # }
}

print "print qq{";
while ( <> ) {
    use bytes;
    s/(.)/&e($1)/egms;

    print "$_";
}

print "};";

けっきょくつかわなくなった....