add new param... fillHW=true which will fill the attributes with the new image's width and height