SMS::Image - common image conversion functions for use in SMS applications. |
SMS::Image - common image conversion functions for use in SMS applications.
use SMS::Image qw(png_to_ota);
# Read PNG data from file, convert into OTA bitmap, and write back to file. my $png; my $buf; # temporary buffer open(F,'<test.png') || die; binmode(F); while(read F, $buf, 1024) { $png .= $buf; } close(F); my $ota; &png_to_ota(\$png,\$ota); open(F,'>test.ota') || die; binmode(F); print F $ota; close(F);
SMS::Image contains common image conversion functions for use in SMS applications.
All functions have no return value.
gif_to_ota(\$gif,\$ota)
Parameters:
1. Reference to GIF image buffer. 2. Reference to receive buffer for OTA bitmap.
ota_to_gif(\$ota,\$gif)
Parameters:
1. Reference to OTA image buffer. 2. Reference to receive buffer for GIF bitmap.
png_to_ota(\$png,\$ota)
Parameters:
1. Reference to PNG image buffer. 2. Reference to receive buffer for OTA bitmap.
ota_to_png(\$ota,\$png)
Parameters:
1. Reference to OTA image buffer. 2. Reference to receive buffer for PNG bitmap.
raw_to_ota(\$raw,$width,$height,$bits_per_pixel,\$ota)
Parameters:
1. Reference to raw binary image buffer. 2. Image width. 3. Image height. 4. Color depth (currently only a value of 1 is supported). 5. Reference to receive buffer for OTA bitmap.
Returns boolean result.
ota_to_raw(\$ota,\$raw)
Parameters:
1. Reference to OTA bitmap buffer. 2. Reference to receive buffer for raw binary image.
Returns array of image width, image height, color depth.
Craig Manley c.manley@skybound.nl
Copyright (C) 2001 Craig Manley <c.manley@skybound.nl>. All rights reserved. This program is free software; you can redistribute it and/or modify it under under the same terms as Perl itself. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SMS::Image - common image conversion functions for use in SMS applications. |