You can check the Image Alias Handler file located in kernel/classes/datatype/ezimage as far as I can remember...
There is two functions :
- the first to create a new handler, you put your new file as a parameter - the second one let you create all the "thumbnails" (image alias) as defined in image.ini.