fix bug in --imgsize