Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Image::Xbm2bmp 0.02

    Download button

    No screenshots available
    Downloads: 149  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    huangxin | More programs
    Perl Artistic License / FREE
    March 18th, 2011, 10:28 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Image::Xbm2bmp description

    For converting image file from XBM to BMP

    XBM is a simple image format. We can show a dynamic picture easily via it, and some CGI use XBM files, but it can't be used in browsers such as the one from WindowsXP(sp2), therefore we need the Image::Xbm2bmp module to convert it.

    SYNOPSIS

     use Image::Xbm2bmp;

     #Create a object from a xbm file
     my $obj = Image::Xbm2bmp->new("/tmp/test.xbm");

     #Create a object from array data
     my $xbm_width = 32;
     my $xbm_height = 24;
     my @xbm_data = (
     0x7c,0x3c,0x7c,0x3c,
     0xfe,0x7c,0xfe,0x7c,
     0xee,0xee,0xee,0xee,
     0xe0,0xee,0x60,0xee,
     0x70,0xfe,0x30,0xfe,
     0x38,0xec,0xe0,0xec,
     0x1c,0xe0,0xee,0xe0,
     0xfe,0x7e,0xfe,0x7e,
     0xfe,0x3c,0x7c,0x3c
     );
     my $obj = Image::Xbm2bmp->new();
     $obj->load_xbm_data(\@xbm_data,$xbm_width,$xbm_height);

     #Save as a BMP file
     $obj->to_bmp_file("/tmp/test.bmp");
     
     #Or get a packed data
     my $packed_data = $obj->to_bmp_pack();

     open(FILE,">/tmp/test.bmp");
     print FILE $packed_data;
     close(FILE);

     #In CGI script
     print "Content-type: image/bmp\n\n";
     print $obj->to_bmp_pack();



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    XBM to BMP | image converter | Perl module | XBM | BMP | image

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM