|
PCX::Loader - Loads 320x200 8-bit PCX-format graphics. |
PCX::Loader - Loads 320x200 8-bit PCX-format graphics.
my $pcx = new PCX::Loader('face.pcx');
$pcx->{palette}->[0]->{red};
$pcx->{palette}->[0]->{green};
$pcx->{palette}->[0]->{blue};
Each is in the range of 0..63, corresponding to their named color component.
[$left,$top,$right,$bottom]
These must be in the range of 0..319 for $left and $right, and the range of 0..199 for $top and $bottom. The block is returned as an array ref with horizontal lines in sequental order. I.e. to get a pixel from [2,5] in the block, and $left-$right was 20, then the element in the array ref containing the contents of coordinates [2,5] would be found by [5*20+2] ($y*$width+$x).
print $pcx->get_block(0,0,20,50)->[5*20+2];
This would print the contents of the element at block coords [2,5].
This is the beta release of AI::NeuralNet::Mesh, and that holding true, I am sure
there are probably bugs in here which I just have not found yet. If you find bugs in this module, I would
appreciate it greatly if you could report them to me at <jdb@wcoil.com>,
or, even better, try to patch them yourself and figure out why the bug is being buggy, and
send me the patched code, again at <jdb@wcoil.com>.
Josiah Bryan <jdb@wcoil.com>
Copyright (c) 2000 Josiah Bryan. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The PCX::Loader module is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.
$Id: PCX::Loader.pm, v0.50 2000/22/12 00:01:27 josiah Exp $
You can always download the latest copy of AI::NeuralNet::Mesh from http://www.josiah.countystart.com/modules/AI/cgi-bin/rec.pl?pcx-loader:pod
|
PCX::Loader - Loads 320x200 8-bit PCX-format graphics. |