Here is a function that retrieves the size of an image directly into the file. We just have to pass the file and its type parameter and return the size of the image as « Rectangle ». //—————————————————————————————————— // AS3/AIR Extract Image size on file // V 1.0 //—————————————————————————————————— public function GetImageSize(ImageFile : File, Type : String) [...]
Here is a function wich check if a file is an image or not. The file type is determined following the signing of the header. //—————————————————————————————————— // AS3/AIR Image detection with unknow file type extention. // V 1.0 //—————————————————————————————————— public function GetImageFileType(TestFile : File) : String { var extention : String = ""; var Bytes [...]
Continue reading about AS3 – Image detection with unknow file type extention. »