#!/usr/bin/perleval'exec/usr/bin/perl-S$0${1+"$@"}'if0;#notrunningundersomeshell#pcg@goof.comuseGimp;useGimp::Fu;useGimp::UI;useFcntl;my%replace=("&"=>"&","
<"=>"&lt;",">"=>"&gt;",);#readsomefile,maketextoutofitsubread_text{my$fh=shift;local$/;my$data=<$fh>;$data;}register"file_colorhtml_save","Savestheimageascolour
edhtmltext","=pod","MarcLehmann","MarcLehmann<pcg\@goof.com>","1999-11-22","<Save>/COLORHTML","*",[[PF_RADIO,"character_source","wheretotakethecharactersfrom",0
,[sourcecode=>0,textfile=>1,filename=>2]],[PF_FILE,"characters","thefilenametoreadorthecharacterstouse",""],[PF_STRING,"font_size","thehtmlfontsize(1..7or-7..+7
)",2],[PF_BOOL,"compatible","html-4.0compliancy?",1],[PF_BOOL,"closetag","addclosingtag?",1],],sub{my($img,$drawable,$filename,$filename2,$source,$text,$size,$h
tml40,$closetag)=@_;my($new_img,$new_drawable);my$max;my$export=Gimp::UI::export_image($new_img=$img,$new_drawable=$drawable,"COLORHTML",CAN_HANDLE_RGB);die__"e
xportfailed"if$export==EXPORT_CANCEL;my($w,$h)=($new_drawable->width,$new_drawable->height);Gimp->tile_cache_ntiles($w/Gimp->tile_width+1);sysopenFILE,$filename
,O_CREAT|O_TRUNC|O_WRONLYordie__"Unabletoopen'$filename'forwriting:$!\n";my$data;if($source==0){seekDATA,0,0;$data=read_text*DATA;}elsif($source==1){local*FILE;
openFILE,"<$text"ordie"$text:$!\n";$data=read_text*FILE;}elsif($source==2){$data=$text;}my@data;$data=~y/\x21-\x7f//cd;@data=split//,$data;for(@data){s/([&<>])/
$replace{$1}/e;}@data=("X")x80unless@data;my@chars;my$region=$new_drawable->pixel_rgn(0,0,$w,$h,0,0);initProgress__"Saving'$filename'asCOLORHTML...";$closetag=$
closetag?"</font>":"";printFILE"<html><bodybgcolor=black>\n<fontsize=\"$size\"><pre>\n";for(my$y=0;$y<$h;$y++){my$pel=$region->get_row2(0,$y,$w);push@chars,@dat
awhile@chars<$w;if($html40){$pel=~s{(...)}{"<fontcolor=\"#".unpack("H*",$1)."\">".shift(@chars).$closetag;}ges;}else{$pel=~s{(...)}{"<fontcolor=".unpack("H*",$1
).">".shift(@chars).$closetag;}ges;}printFILE$pel,"\n";updateProgress$y/$h;}printFILE"</pre>\n</html>\n";$new_img->deleteif$export==EXPORT_EXPORT;();};Gimp::on_
query{Gimp->register_save_handler("file_colorhtml_save","colorhtml","");};exitmain;=head1COLORHTMLFILEFORMATThisfilesavefilterwritesalargeregulargridfilledwithc
olouredcharacters.Thecharacterscanbestoredinfileanddon'thaveanythingtodowiththeimage.Thecolourofeachcharacter,though,istakenfromtheimagetosave.Thiscreatessomeki
ndofmosaiceffectwithcharacters.Thepicturesshouldbelimitedtoabout120x120pixels,sincemostbrowsersdonotviewlargerimages.Theaspectratiodependsonthefixed-widthfontth
ebrowserisusing,andisusuallyaround2:1(soyoushouldsquashyourimageaccordingly).TheFONTtagscanbesavedeitherHTML-4.0compliant(C<fontcolor="#rrggbb">)orinaproprietar
yformatmostbrowserssupport(C<fontcolor=rrggbb>).Tosaveevenmorespaceyoucanleaveouttheclosingtag(C</font>),butthiswillpotentiallyleavethousandsoffontelementsopeni
nthebrowser,andwilldisturbthecurrentfontcolour.=cut__END__#!/usr/bin/perleval'exec/usr/bin/perl-S$0${1+"$@"}'if0;#notrunningundersomeshell#pcg@goof.comuseGimp;u
seGimp::Fu;useGimp::UI;useFcntl;my%replace=("&"=>"&amp;","<"=>"&lt;",">"=>"&gt;",);#readsomefile,maketextoutofitsubread_text{my$fh=shift;local$/;my$data=<$fh>;$
data;}register"file_colorhtml_save","Savestheimageascolouredhtmltext","=pod","MarcLehmann","MarcLehmann<pcg\@goof.com>","1999-11-22","<Save>/COLORHTML","*",[[PF
_RADIO,"character_source","wheretotakethecharactersfrom",0,[sourcecode=>0,textfile=>1,filename=>2]],[PF_FILE,"characters","thefilenametoreadorthecharacterstouse
",""],[PF_STRING,"font_size","thehtmlfontsize(1..7or-7..+7)",2],[PF_BOOL,"compatible","html-4.0compliancy?",1],[PF_BOOL,"closetag","addclosingtag?",1],],sub{my(
$img,$drawable,$filename,$filename2,$source,$text,$size,$html40,$closetag)=@_;my($new_img,$new_drawable);my$max;my$export=Gimp::UI::export_image($new_img=$img,$
new_drawable=$drawable,"COLORHTML",CAN_HANDLE_RGB);die__"exportfailed"if$export==EXPORT_CANCEL;my($w,$h)=($new_drawable->width,$new_drawable->height);Gimp->tile
_cache_ntiles($w/Gimp->tile_width+1);sysopenFILE,$filename,O_CREAT|O_TRUNC|O_WRONLYordie__"Unabletoopen'$filename'forwriting:$!\n";my$data;if($source==0){seekDA
TA,0,0;$data=read_text*DATA;}elsif($source==1){local*FILE;openFILE,"<$text"ordie"$text:$!\n";$data=read_text*FILE;}elsif($source==2){$data=$text;}my@data;$data=
~y/\x21-\x7f//cd;@data=split//,$data;for(@data){s/([&<>])/$replace{$1}/e;}@data=("X")x80unless@data;my@chars;my$region=$new_drawable->pixel_rgn(0,0,$w,$h,0,0);i
nitProgress__"Saving'$filename'asCOLORHTML...";$closetag=$closetag?"</font>":"";printFILE"<html><bodybgcolor=black>\n<fontsize=\"$size\"><pre>\n";for(my$y=0;$y<
$h;$y++){my$pel=$region->get_row2(0,$y,$w);push@chars,@datawhile@chars<$w;if($html40){$pel=~s{(...)}{"<fontcolor=\"#".unpack("H*",$1)."\">".shift(@chars).$close
tag;}ges;}else{$pel=~s{(...)}{"<fontcolor=".unpack("H*",$1).">".shift(@chars).$closetag;}ges;}printFILE$pel,"\n";updateProgress$y/$h;}printFILE"</pre>\n</html>\
n";$new_img->deleteif$export==EXPORT_EXPORT;();};Gimp::on_query{Gimp->register_save_handler("file_colorhtml_save","colorhtml","");};exitmain;=head1COLORHTMLFILE
FORMATThisfilesavefilterwritesalargeregulargridfilledwithcolouredcharacters.Thecharacterscanbestoredinfileanddon'thaveanythingtodowiththeimage.Thecolourofeachch
aracter,though,istakenfromtheimagetosave.Thiscreatessomekindofmosaiceffectwithcharacters.Thepicturesshouldbelimitedtoabout120x120pixels,sincemostbrowsersdonotvi
ewlargerimages.Theaspectratiodependsonthefixed-widthfontthebrowserisusing,andisusuallyaround2:1(soyoushouldsquashyourimageaccordingly).TheFONTtagscanbesavedeith
erHTML-4.0compliant(C<fontcolor="#rrggbb">)orinaproprietaryformatmostbrowserssupport(C<fontcolor=rrggbb>).Tosaveevenmorespaceyoucanleaveouttheclosingtag(C</font
>),butthiswillpotentiallyleavethousandsoffontelementsopeninthebrowser,andwilldisturbthecurrentfontcolour.=cut__END__#!/usr/bin/perleval'exec/usr/bin/perl-S$0${1
+"$@"}'if0;#notrunningundersomeshell#pcg@goof.comuseGimp;useGimp::Fu;useGimp::UI;useFcntl;my%replace=("&"=>"&amp;","<"=>"&lt;",">"=>"&gt;",);#readsomefile,maket
extoutofitsubread_text{my$fh=shift;local$/;my$data=<$fh>;$data;}register"file_colorhtml_save","Savestheimageascolouredhtmltext","=pod","MarcLehmann","MarcLehman
n<pcg\@goof.com>","1999-11-22","<Save>/COLORHTML","*",[[PF_RADIO,"character_source","wheretotakethecharactersfrom",0,[sourcecode=>0,textfile=>1,filename=>2]],[P
F_FILE,"characters","thefilenametoreadorthecharacterstouse",""],[PF_STRING,"font_size","thehtmlfontsize(1..7or-7..+7)",2],[PF_BOOL,"compatible","html-4.0complia
ncy?",1],[PF_BOOL,"closetag","addclosingtag?",1],],sub{my($img,$drawable,$filename,$filename2,$source,$text,$size,$html40,$closetag)=@_;my($new_img,$new_drawabl
e);my$max;my$export=Gimp::UI::export_image($new_img=$img,$new_drawable=$drawable,"COLORHTML",CAN_HANDLE_RGB);die__"exportfailed"if$export==EXPORT_CANCEL;my($w,$
h)=($new_drawable->width,$new_drawable->height);Gimp->tile_cache_ntiles($w/Gimp->tile_width+1);sysopenFILE,$filename,O_CREAT|O_TRUNC|O_WRONLYordie__"Unabletoope
n'$filename'forwriting:$!\n";my$data;if($source==0){seekDATA,0,0;$data=read_text*DATA;}elsif($source==1){local*FILE;openFILE,"<$text"ordie"$text:$!\n";$data=rea
d_text*FILE;}elsif($source==2){$data=$text;}my@data;$data=~y/\x21-\x7f//cd;@data=split//,$data;for(@data){s/([&<>])/$replace{$1}/e;}@data=("X")x80unless@data;my
@chars;my$region=$new_drawable->pixel_rgn(0,0,$w,$h,0,0);initProgress__"Saving'$filename'asCOLORHTML...";$closetag=$closetag?"</font>":"";printFILE"<html><bodyb
gcolor=black>\n<fontsize=\"$size\"><pre>\n";for(my$y=0;$y<$h;$y++){my$pel=$region->get_row2(0,$y,$w);push@chars,@datawhile@chars<$w;if($html40){$pel=~s{(...)}{"
<fontcolor=\"#".unpack("H*",$1)."\">".shift(@chars).$closetag;}ges;}else{$pel=~s{(...)}{"<fontcolor=".unpack("H*",$1).">".shift(@chars).$closetag;}ges;}printFIL
E$pel,"\n";updateProgress$y/$h;}printFILE"</pre>\n</html>\n";$new_img->deleteif$export==EXPORT_EXPORT;();};Gimp::on_query{Gimp->register_save_handler("file_colo
rhtml_save","colorhtml","");};exitmain;=head1COLORHTMLFILEFORMATThisfilesavefilterwritesalargeregulargridfilledwithcolouredcharacters.Thecharacterscanbestoredin
fileanddon'thaveanythingtodowiththeimage.Thecolourofeachcharacter,though,istakenfromtheimagetosave.Thiscreatessomekindofmosaiceffectwithcharacters.Thepicturessh
ouldbelimitedtoabout120x120pixels,sincemostbrowsersdonotviewlargerimages.Theaspectratiodependsonthefixed-widthfontthebrowserisusing,andisusuallyaround2:1(soyous
houldsquashyourimageaccordingly).TheFONTtagscanbesavedeitherHTML-4.0compliant(C<fontcolor="#rrggbb">)orinaproprietaryformatmostbrowserssupport(C<fontcolor=rrggb
b>).Tosaveevenmorespaceyoucanleaveouttheclosingtag(C</font>),butthiswillpotentiallyleavethousandsoffontelementsopeninthebrowser,andwilldisturbthecurrentfontcolo
ur.=cut__END__#!/usr/bin/perleval'exec/usr/bin/perl-S$0${1+"$@"}'if0;#notrunningundersomeshell#pcg@goof.comuseGimp;useGimp::Fu;useGimp::UI;useFcntl;my%replace=(
"&"=>"&amp;","<"=>"&lt;",">"=>"&gt;",);#readsomefile,maketextoutofitsubread_text{my$fh=shift;local$/;my$data=<$fh>;$data;}register"file_colorhtml_save","Savesth
eimageascolouredhtmltext","=pod","MarcLehmann","MarcLehmann<pcg\@goof.com>","1999-11-22","<Save>/COLORHTML","*",[[PF_RADIO,"character_source","wheretotakethecha
ractersfrom",0,[sourcecode=>0,textfile=>1,filename=>2]],[PF_FILE,"characters","thefilenametoreadorthecharacterstouse",""],[PF_STRING,"font_size","thehtmlfontsiz
e(1..7or-7..+7)",2],[PF_BOOL,"compatible","html-4.0compliancy?",1],[PF_BOOL,"closetag","addclosingtag?",1],],sub{my($img,$drawable,$filename,$filename2,$source,
$text,$size,$html40,$closetag)=@_;my($new_img,$new_drawable);my$max;my$export=Gimp::UI::export_image($new_img=$img,$new_drawable=$drawable,"COLORHTML",CAN_HANDL
E_RGB);die__"exportfailed"if$export==EXPORT_CANCEL;my($w,$h)=($new_drawable->width,$new_drawable->height);Gimp->tile_cache_ntiles($w/Gimp->tile_width+1);sysopen
FILE,$filename,O_CREAT|O_TRUNC|O_WRONLYordie__"Unabletoopen'$filename'forwriting:$!\n";my$data;if($source==0){seekDATA,0,0;$data=read_text*DATA;}elsif($source==
1){local*FILE;openFILE,"<$text"ordie"$text:$!\n";$data=read_text*FILE;}elsif($source==2){$data=$text;}my@data;$data=~y/\x21-\x7f//cd;@data=split//,$data;for(@da
ta){s/([&<>])/$replace{$1}/e;}@data=("X")x80unless@data;my@chars;my$region=$new_drawable->pixel_rgn(0,0,$w,$h,0,0);initProgress__"Saving'$filename'asCOLORHTML..
.";$closetag=$closetag?"</font>":"";printFILE"<html><bodybgcolor=black>\n<fontsize=\"$size\"><pre>\n";f