- minWidth = options.minWidth || 0;
- minHeight = options.minHeight || 0;
- maxWidth = min(options.maxWidth || 1<<24, imgWidth);
- maxHeight = min(options.maxHeight || 1<<24, imgHeight);
+ minWidth = round(options.minWidth / scaleX) || 0;
+ minHeight = round(options.minHeight / scaleY) || 0;
+ maxWidth = round(min(options.maxWidth / scaleX || 1<<24, imgWidth));
+ maxHeight = round(min(options.maxHeight / scaleY || 1<<24, imgHeight));