Skip to content

A class for reading and saving ICO files. Works with 64px and 24px sizes in addition to 256, 128, 48, 32, 16.

License

Notifications You must be signed in to change notification settings

alexzielenski/ICOFamily

Repository files navigation

ICOFamily

ICOFamily is a class that I made to save a legitamite ICO file. It deals with all the dirty work. All you need to do is just set the Images you are using and save it using the provided methods. It manually adds the headers and works with 64 × 64 and 24 × 24 pixel images unlike the built in functions in Core Foundation for saving ICO files.

Documentation

Documentation is generated with appledoc and included the the /Help/cxhtml directory. Refer back to it for documentation.

Usage

You should use ICOFamily just like any other class.

- (NSData*)ICODataForMyApp {
	ICOFamily *myFamily = [ICOFamily family]; // Returns an autoreleased instance
	[myFamily setImage:bigImage256 forElement:ICOFamily256Element];
	// etc, setting the predefined elements for the appropriate image.
	[myFamily setImage:customImage57 forCustomSize:customImage57.size]; // You can also set any size under 256px for custom sizes in an ICO file.
	return myFamily.data;
}

License

I prefer that I am credited in the About box of your app if you used some of my source code with the following format:

Uses ICOFamily by Alex Zielenski

All code in this repository is licensed under the MIT license (with the exception of the NSMutableData category; courtesy of Mathew Eis). Here is some legal jargon:

Copyright © 2011 Alex Zielenski All Rights Reserved

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A class for reading and saving ICO files. Works with 64px and 24px sizes in addition to 256, 128, 48, 32, 16.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •