Anxious to contribute some of your hard-earned money? We probably won't refuse!
Not so anxious? That's cool, we're still friends.
Bradicon uses PHP to convert from common image files to an icon file. It makes use of a custom low-level binary-data-manipulation engine written with PHP. The engine makes use of two types of data: structures, and primitives.
Structures consist of fields, each of which has a type and supports an optional expected value. The type is either another structure of a primitive. The optional expected value is used for some simple automated data-checking.
Structures are type-checked recursively before processing, and must eventually resolve to known primitives. Recursive structures are not accounted for.
Primitives are common data types/sizes. For the purpose of Bradicon the primitives defined are: WORD, DWORD, LONG, and BYTE.
The engine handles the loading and storing of structures by providing base-case load and store fuctions which are used by default. User specified can be provided for more complex structures as required, and the engine will make use of those instead if they exist.
Bradicon defines a custom load function, as ICONDIR contains an array whose length is defined by a seperate field in the structure, but uses only the default store function - it handles the storage of arrays.
Bradicon converts icons by reading in the image, resizing it, populating an icon structure with the appropriate data, and finally saving it.
Given an image, Bradicon creates three 32bit images (48x48, 32x32, 16x16) for the icon resource.
The script has a server-imposed memory limit of 8mb, which is why there are height and width restrictions when processing an image. The width * the height * the bitcount of the image / 8 must be less than the 8mb memory limit for Bradicon to create an icon successfully.
Your image files might be too big! When analyzing your image if the explicit memory limit is exceeded, your file might not be converted.
But just resize your image, and try again.