if you request an image only by hight, $w will be 0