This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This bug proposes the following new options for createImageBitmap()'s configuration dictionary (as proposed in bug 25639): double? width = null // resulting width if image is to be resampled double? height = null // resulting height if image is to be resampled
Related to this is the idea of using background-size style options to control exactly what these dimensions mean, for the case where you don't know the source image's dimensions but want an output image that is of this size: SizeKind size = 'scale' // how to resize the image // SizeKind: // 'scale' - stretch or shrink to the given width and height, with the // aspect ratio being ignored // 'contain' - the given width and height are maximum values, maintain the // original aspect ratio of sourceW:sourceH // 'cover' - the image must be scaled, while maintaining the aspect ratio, // to the smallest size that has a width >= the width member and a // height >= the height member. When the width and height values are both null, they default to the sourceW and sourceH values (which themselves default to the intrinsic dimensions after taking sourceX and sourceY into account). When width is set and height is null, then the aspect ratio of sourceW:sourceH is used to set height based on width, and vice versa for height set, width null.
Should there be an image smoothing option here?
https://github.com/whatwg/html/issues/865