1 package GSM::SMS::OTA::CLIicon;
2 use GSM::SMS::OTA::Bitmap;
7 @EXPORT = qw( OTACLIicon_makestream
15 use constant OTACLIicon_PORT => 5507;
17 sub OTACLIicon_fromb64 {
18 my ($b64, $format) = @_;
20 my $arr = OTABitmap_fromb64( $b64, $format );
21 return -1 if $arr == -1;
23 return OTACLIicon_makestream( 72, 14, 1, $arr );
26 sub OTACLIicon_fromfile {
29 my $arr = OTABitmap_fromfile( $file );
30 return -1 if $arr == -1;
32 return OTACLIicon_makestream( 72, 14, 1, $arr );
35 sub OTACLIicon_makestream {
36 my ($width, $height, $depth, $ref_bytearray) = @_;
40 $stream.='00'; # Nokia stuff for CLI identification
41 $stream.=OTABitmap_makestream($width, $height, $depth, $ref_bytearray);
50 GSM::SMS::OTA::CLIicon
54 This package implements encoding of a CLI ( Caller Line Identification ) icon.
58 =head2 OTACLIicon_fromb64
60 $stream = OTACLIicon_fromb64( $b64, $format );
62 Generate a CLI icon from a b64 endoded bitmap in the specified format ( gif, png, bmp, ... ).
64 =head2 OTACLIicon_fromfile
66 $stream =OTACLIicon_fromfile( $file );
68 Generate a CLI icon from an image file.
70 =head2 OTACLIicon_PORT
72 NSB port number for CLI icon message.
76 Johan Van den Brande <johan@vandenbrande.com>