i dont follow Q_Hybrid, simply using getPixel on a astatic bitmap shouldn't effect performance at all, its just a lookup isn't it?

ever, i'd do what V said, full white should be the highest point possible, black being the lowest. Then simply find the percentage of gray you're at

var maxHeight = 200;
var color = heightMap.getPixel(hero._x, hero._y) >> 24 & 0xFF
var height = (color / 255) * maxHeight

hero._xscale = hero._yscale = height