/usr/bin/wbmp2xbm is in wapua 0.06.1-3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | #!/usr/bin/perl -w
eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
if 0; # not running under some shell
my $VERSION = '0.06.1';
my $COPYRIGHT = '(C) 2000, 2006, 2009 by Axel Beckert <wapua@deuxchevaux.org>';
# Copyright (C) 2000, 2006, 2009 by Axel Beckert <wapua@deuxchevaux.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
#
# You can reach the author by snail-mail at the following address:
#
# Axel Beckert
# Kürbergstrasse 20
# 8049 Zürich, Switzerland
use wApua::WBMP2XBM;
my $verbose = 0;
my $debug = 0;
$0 =~ m([^/]+$);
my $basename = $&;
sub usage {
&version();
print <<EOT;
Usage: $basename [-v|--verbose] [--debug=<n>] <file>.wbmp
$basename (-h|--help|--usage)
$basename (-V|--version)
Will generate an X Bitmap file called <file>.xbm
EOT
}
sub version {
print "$basename $VERSION $COPYRIGHT\n";
}
unless (@ARGV) {
&usage();
exit 1;
}
foreach (@ARGV) {
if (/^(-h|--help|--usage)$/) {
&usage();
exit 0;
}
if (/^(-V|--version)$/) {
print "$0 $VERSION $COPYRIGHT\n";
exit 0;
}
if (/^(-v|--verbose)$/) {
$verbose = 1;
next;
}
if (/^--debug=(\d+)$/) {
$debug = $1;
next;
}
my $wbmpfile = $_;
my $filebasename = $_;
$filebasename =~ s/\.wbmp$//i;
my $xbmfile = $filebasename.".xbm";
open(WBMP, '<', $wbmpfile) or die "Can't open $_ for reading";
my $wbmp = "";
while (<WBMP>) {
$wbmp .= $_;
}
my $wbmpObj = new wApua::WBMP2XBM($wbmp,$filebasename,$debug);
die "An error occured during conversion"
unless $wbmpObj->xbm;
print STDERR "Image dimension: ".$wbmpObj->dimension."\n" if $verbose;
open(XBM, '>', $xbmfile) or die "Can't write to $xbmfile";
print XBM $wbmpObj->xbm;
close XBM;
close WBMP;
}
__END__
=head1 NAME
wbmp2xbm - converts WBMP to XBM
=head1 SYNOPSIS
=over 1
=item wbmp2xbm [-v|--verbose] [--debug=I<n>] F<file.wbmp> F<...>
=item wbmp2xbm (-h|--help|--usage)
=item wbmp2xbm (-V|--version)
=back
=head1 DESCRIPTION
wbmp2xbm is a converter from WAP Wireless Bitmaps (WBMP) to X Bitmaps
(XBM) written in Perl. It uses the same converting library as the WAP
WML browser wApua.
wbmp2xbm needs at least one WBMP file as argument and will save it as
XBM file with the same basename but a .xbm suffix.
=head1 OPTIONS
=over 22
=item -h, --help, --usage
Shows a summary of options.
=item -V, --version
Shows the version of wbmp2xbm.
=item -d I<n>, --debug=I<n>
Sets the level of debug output to I<n>.
=back
=head1 SEE ALSO
L<wApua(1p)>, L<wbmp2xpm(1)>, L<convert(1)>.
The wApua FAQ at L<http://fsinfo.noone.org/~abe/wApua/FAQ.html>
=head1 COPYRIGHT
Copyright (C) 2000, 2006, 2009 by Axel Beckert <wapua@deuxchevaux.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL. It also came with
wApua in the file F<COPYING>.
=head1 AUTHOR
wbmp2xbm was written by Axel Beckert <wapua@deuxchevaux.org>
|