com-jpexs-image-bmp
[ class tree: com-jpexs-image-bmp ] [ index: com-jpexs-image-bmp ] [ all elements ]

Procedural File: ico.php

Source Location: /vendor/JPEXS/ico.php



Page Details:



Tags:

author:  JPEXS
version:  2.1
copyright:  

(c) JPEXS 2004-2009

Webpage: http://www.jpexs.com Email: [email protected]

If you like my script, you can donate... visit my webpages or email me for more info.

Version changes: v2.1 - redesigned sourcecode, phpdoc included, all internal functions and global variables have prefix "jpexs_" v2.0 - For icons with Alpha channel now you can set background color

  • ImageCreateFromExeIco added
  • Fixed ICO_MAX_SIZE and ICO_MAX_COLOR values
TODO list:
  • better error handling
  • class encapsulation
License:
  • you can freely use it
  • you can freely distribute sourcecode
  • you can freely modify it as long as you leave my copyright/author info in source code
  • if you developing closesource application, you should add my name at least to "about" page of your web application
  • if you create an amazing modification, please contact me... I can publish link to your webpage if you're interested...
  • if you want to use my script in commercial application for earning money, you should make a donation to me first








ICO_MAX_COLOR [line 38]

ICO_MAX_COLOR = -2
Image with maximum colors


[ Top ]



ICO_MAX_SIZE [line 40]

ICO_MAX_SIZE = -2
Image with maximal size


[ Top ]



ICO_TRUE_COLOR [line 34]

ICO_TRUE_COLOR = 0x1000000
TrueColor images constant


[ Top ]



ICO_XP_COLOR [line 36]

ICO_XP_COLOR = 4294967296
XPColor images constant (Alpha channel)


[ Top ]



MAX_COLOR [line 54]

MAX_COLOR = -2
Image with maximum colors



Tags:

deprecated:  Deprecated since version 2.1, please use ICO_ constants

[ Top ]



MAX_SIZE [line 58]

MAX_SIZE = -2
Image with maximal size



Tags:

deprecated:  Deprecated since version 2.1, please use ICO_ constants

[ Top ]



TRUE_COLOR [line 46]

TRUE_COLOR = 0x1000000
TrueColor images constant



Tags:

deprecated:  Deprecated since version 2.1, please use ICO_ constants

[ Top ]



XP_COLOR [line 50]

XP_COLOR = 4294967296
XPColor images constant (Alpha channel)



Tags:

deprecated:  Deprecated since version 2.1, please use ICO_ constants

[ Top ]




imageCreateFromExeIco [line 397]

resource imageCreateFromExeIco( string $filename, int $icoIndex, [int $icoColorCount = 16], [int $icoSize = 16], [int $alphaBgR = 255], [int $alphaBgG = 255], [int $alphaBgB = 255])

Reads image from a icon in exe file



Tags:

return:  Image resource or false on error


Parameters

string   $filename   Target exefile
int   $icoIndex   Index of the icon in exefile
int   $icoColorCount   Icon color count (For multiple icons ico file) - 2,16,256, ICO_TRUE_COLOR, ICO_XP_COLOR or ICO_MAX_COLOR
int   $icoSize   Icon width (For multiple icons ico file) or ICO_MAX_SIZE
int   $alphaBgR   Background color R value for alpha-channel images (Default is White)
int   $alphaBgG   Background color G value for alpha-channel images (Default is White)
int   $alphaBgB   Background color B value for alpha-channel images (Default is White)
[ Top ]



imageCreateFromIco [line 72]

resource imageCreateFromIco( string $filename, [int $icoColorCount = 16], [int $icoSize = 16], [int $alphaBgR = 255], [int $alphaBgG = 255], [int $alphaBgB = 255])

Reads image from a ICO file



Tags:

return:  Image resource


Parameters

string   $filename   Target ico file to load
int   $icoColorCount   Icon color count (For multiple icons ico file) - 2,16,256, ICO_TRUE_COLOR, ICO_XP_COLOR or ICO_MAX_COLOR
int   $icoSize   Icon width (For multiple icons ico file) or ICO_MAX_SIZE
int   $alphaBgR   Background color R value for alpha-channel images (Default is White)
int   $alphaBgG   Background color G value for alpha-channel images (Default is White)
int   $alphaBgB   Background color B value for alpha-channel images (Default is White)
[ Top ]



imageIco [line 597]

void imageIco( resource|array $images, [string $filename = ""])

Creates ico file from image resource(s)



Parameters

resource|array   $images   Target Image resource (Can be array of image resources)
string   $filename   Target ico file to save icon to, If ommited or "", image is written to snadard output - use header("Content-type: image/x-icon");
[ Top ]



jpexs_GetIconsInfo [line 351]

void jpexs_GetIconsInfo( $filename)



Parameters

   $filename  
[ Top ]



jpexs_inttodword [line 955]

void jpexs_inttodword( $n)



Parameters

   $n  
[ Top ]



jpexs_inttoword [line 960]

void jpexs_inttoword( $n)



Parameters

   $n  
[ Top ]



jpexs_readIcon [line 228]

void jpexs_readIcon( $filename, $id, &$Ikona)



Parameters

   $filename  
   $id  
   &$Ikona  
[ Top ]



jpexs_readResDirectoryEntry [line 543]

void jpexs_readResDirectoryEntry( &$parentRes, $offset)

Internal function for reading exe icons



Parameters

   &$parentRes  
   $offset  
[ Top ]



saveExeIcon [line 420]

boolean saveExeIcon( string $filename, [string $icoFileNameOrPath = ""], [int|array $iconIndex = -1])

Saves icon(s) from the exe file



Tags:

return:  True on successful save


Parameters

string   $filename   Target exefile
string   $icoFileNameOrPath   Filename to save ico or path (Default "") Path if you want more than 1 icon. If "", the filename is "$icoIndex.ico"
int|array   $iconIndex   Index(es) of the icon in exefile (Default -1) If -1, all icons are saved, Can be an array of indexes.
[ Top ]



Documentation generated on Sat, 31 Jul 2010 20:37:58 +0200 by phpDocumentor 1.4.2