Variable width returned in $image_array was equal to height