ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/map-world.ext
(Generate patch)

Comparing deliantra/server/ext/map-world.ext (file contents):
Revision 1.20 by root, Sat Apr 14 07:22:59 2007 UTC vs.
Revision 1.21 by root, Tue Apr 17 20:41:15 2007 UTC

41 eval { 41 eval {
42 open my $fh, "convert \Q$path.png\E -depth 8 rgb:- |" 42 open my $fh, "convert \Q$path.png\E -depth 8 rgb:- |"
43 or die "convert: $!"; 43 or die "convert: $!";
44 binmode $fh; 44 binmode $fh;
45 45
46 binmode $fh;
47 $size * 3 == read $fh, my $data, $size * 3 46 $size * 3 == read $fh, my $data, $size * 3
48 or die "$path.png, expected $size rgb triplets: $!"; 47 or die "$path.png, expected $size rgb triplets: $!";
49 48
50 $data =~ s{(...)}{ 49 cf::_quantise $data, [map "$_$plt{$_}", keys %plt];
51 $plt{$1} or die "$path.png: color not in palette: #" . unpack "H*", $1
52 }sge;
53 50
54 binmode STDOUT; 51 binmode STDOUT;
55 syswrite STDOUT, $data; 52 syswrite STDOUT, $data;
56 }; 53 };
57 warn $@ if $@; 54 warn $@ if $@;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines