How to Convert an ICO to a BMP in PHP

The PHP programming language supports conversion functions that you use to convert any file type to the BMP file format. BMP files are not used on the Web, but you can convert the file to a BMP and display it for a user to download or review on the desktop. The "png2wbmp" function allows you to convert an image file from one data type, such as ICO, to a BMP file.

Instructions

    • 1

      Right-click the PHP page you want to use to convert an image and select "Open With." Click on your preferred PHP editor from the list of programs.

    • 2

      Create the variables that contain the name of the source ICO file and the BMP file name that you want to create. The following code sets this up:

      $ico = "myimage.ico";
      $bmp = "myimage.bmp";

      Replace the two instances of “myimage” with your own file names.

    • 3

      Convert the images. The following code performs the conversion and saves the resulting file to converts the image to the specified "/images/" folder:

      png2wbmp($ico, '/images/'.$bmp, 30, 40);

      The "30" and "40" parameters specify the width and height of the image. Change these numbers to the height and width you want to set for the BMP image.

Related Searches:

References

Comments

Related Ads

Featured