PHP Classes

EBM2BMP Class: Convert emblem images in EBM to BMP format

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 54%Total: 453 This week: 1All time: 6,149 This week: 560Up
Version License PHP version Categories
ebm2bmp 1.0GNU Lesser Genera...4HTML, Graphics, Files and Folders, Games
Description 

Author

This class can convert emblem images in EBM format used by Ragnarok Online game to the BMP format or HTML tables.

It can open a given EBM file and parse its contents to retrieve its pixel colors.

The class can either serve an image in BMP format, or an HTML table with cells displayed using the colors of the emblem image pixels, or return an array with the emblem image data.

The class may also replace colors in the image with new tone values.

Innovation Award
PHP Programming Innovation award nominee
May 2007
Number 4


Prize: One copy of DWebPro Standard License
The Ragnarok Online is a role playing multiplayer game that can be played via the Internet.

Emblems are used to represent the guilds of Ragnarok Online players. Emblems are stored in files in the EBM format.

This class can be used to convert an emblem file in EBM format to the BMP format, so you can alter it with a regular image editing program, or even display the emblem in a HTML page.

Manuel Lemos
Picture of Jonathan Discipulo
  Performance   Level  
Name: Jonathan Discipulo is available for providing paid consulting. Contact Jonathan Discipulo .
Classes: 7 packages by
Country: Philippines Philippines
Age: 42
All time rank: 75512 in Philippines Philippines
Week rank: 411 Up4 in Philippines Philippines Up
Innovation award
Innovation award
Nominee: 2x

Details

To use the class, simply include it on your PHP file: include('class.ebm2bmp.php'); Then, instantiate the class: $emblem = new EBM2BMP($path); // where $path is the physical location of the emblem files $emblem->processFile($file); // where $file is the emblem file to convert into BMP If you want to replace the magenta color (transparent in-game) for display in web pages, you can use the replace function: $emblem->replaceColor('FF00FF', 'C0C0C0'); // this will change magenta into silver Now you can choose what to do with the processed files. You can display the actual converted BMP image: // $emblem->showBMP(); Or, display the BMP as tables to make it appear big: // $emblem->showBigImage(); Or even display the BMP information as an array: // $emblem->showArray(); You can choose only 1 from the 3 output methods. Have fun!

  Files folder image Files  
File Role Description
Plain text file class.ebm2bmp.php Class Class EBM2BMP
Accessible without login Plain text file ok.ebm.txt Data Sample Emblem
Accessible without login Plain text file readme.txt Doc. Documentation
Accessible without login HTML file sample.html Data Sample file
Accessible without login Plain text file x1.php Example Sample script
Accessible without login Plain text file x2.php Example Sample script
Accessible without login Plain text file x3.php Example Sample script

 Version Control Unique User Downloads Download Rankings  
 0%
Total:453
This week:1
All time:6,149
This week:560Up
 User Ratings  
 
 All time
Utility:68%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:62%StarStarStarStar
Examples:62%StarStarStarStar
Tests:-
Videos:-
Overall:54%StarStarStar
Rank:2047