Top Documents Download Gallery Repository
Are you looking for a Software Engineer? Check Here

37msico Module

The msico module provides measures to read/write image data in Microsoft Icon file format. To utilize it, import the msico module using import function.

Below is an example to read an ICO file:

import(msico)
img = image('foo.ico')

This module has been implemented referring to the specification: http://msdn.microsoft.com/en-us/library/ms997538.aspx.

37.1Exntension to Function's Capability

This module extends the capability of function image() and instance method image#write() so that they can read/write ICO files.

When function image() is provided with a stream that satisfies the following conditions, it would recognize the stream as a ICO file.

When instance method image#write() is provided with a stream that satisfies the following condition, it would write image data in ICO format.

37.2msico.content Class

37.2.1Constructor

msico.content
msico.content(stream?:stream:r, format:symbol => `rgba) {block?}

37.2.2Method

msico.content#write
msico.content#write(stream:stream:w):reduce
Writes an ICO image to a stream.

msico.content#addimage
msico.content#addimage(image:image):map:reduce

37.3Extension to image Class

This module extends the image class with methods described here.

image#read@msico
image#read@msico(stream:stream:r, idx:number => 0):reduce
Reads an ICO image from a stream.


Copyright (C) 2011-2017 ypsitau