Class IcoUtilities
java.lang.Object
com.iizix.image.IcoUtilities
Utility to create an ICO file from transparent PNG files (or opaque JPG files).
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsMethod Summary
Constructor Details
IcoUtilities
public IcoUtilities()
Method Details
createIco
Creates an ICO file, i.e. a merge of buffered images from transparent PNG files (or opaque JPEG/JPG or BMP files).- Parameters:
ico- The destination icon file.files- Bitmap files (1 to 32) in JPEG/JPG, PNG or BMP format. The format is read from the file's content, not from its extension, so any other format ImageIO can read (e.g. GIF) is accepted too.- Throws:
IOException- For file errors: an input file that does not exist or is a directory (refused here, before ImageIO is called, with this method's own exception naming the file, the same on every OS and JDK), an unreadable file, or content that is not an image ImageIO can read.NullPointerException- Ificoorfilesis null.IllegalArgumentException- Iffilescount is not 1 to 32, or if images in files are not square, or the image size is not between 16 and 256, or if two image files have the same size.
main
Main class.- Parameters:
args- The argument list of files: destination ico, followed by list of JPG/JPEG/PNG/BMP files.