le code :

var ldr:URLLoader= new URLLoader();
ldr.dataFormat=URLLoaderDataFormat.BINARY;// ** make sure you do this **
ldr.addEventListener(Event.COMPLETE, on_fileLoad);
ldr.load(new URLRequest("image.bmp"));
function on_fileLoad(evt:Event):void {
if (evt.type==Event.COMPLETE) {
var data:ByteArray=URLLoader(evt.target).data as ByteArray;
if (data) {
try {
data.uncompress();
} catch (e:Error) {
}
// data is now the uncompressed byte array
// ... process data ...
var width:int=data.readUnsignedInt();// first 4 bytes
// after data.uncompress()
var height:int = ((data.length - 4) / 4) / width;
// (data.length - 4) ** byte array less the first four bytes gives the representation of the bitmap **
// ((data.length - 4) / 4) ** length of the representation is divided by four because each pixel takes four bytes **
// ((data.length - 4) / 4) / width ** remember, it is a rectangle, so we can get the height this way **
var bmd:BitmapData=new BitmapData(width,height,false,0);// 32 bit transparent bitmap
bmd.setPixels(bmd.rect, data);// position of data is now at 5th byte
var bm:Bitmap=new Bitmap(bmd);
addChild(bm);
}
}
}

Merci à ghostwire pour la piste...