fitToEdge: img size caliculation had bug