<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>25641</bug_id>
          
          <creation_ts>2014-05-09 21:17:16 +0000</creation_ts>
          <short_desc>createImageBitmap() options: output size</short_desc>
          <delta_ts>2016-03-16 14:18:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Needs Impl Interest</target_milestone>
          <dependson>25639</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>ian</cc>
    
    <cc>junov</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>105582</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-09 21:17:16 +0000</bug_when>
    <thetext>This bug proposes the following new options for createImageBitmap()&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105590</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-09 21:36:00 +0000</bug_when>
    <thetext>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&apos;t know the source image&apos;s dimensions but want an output image that is of this size:

  SizeKind size = &apos;scale&apos; // how to resize the image
    // SizeKind:
    //   &apos;scale&apos; - stretch or shrink to the given width and height, with the
    //       aspect ratio being ignored
    //   &apos;contain&apos; - the given width and height are maximum values, maintain the
    //       original aspect ratio of sourceW:sourceH
    //   &apos;cover&apos; - the image must be scaled, while maintaining the aspect ratio,
    //       to the smallest size that has a width &gt;= the width member and a
    //       height &gt;= 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106178</commentid>
    <comment_count>2</comment_count>
    <who name="Justin Novosad">junov</who>
    <bug_when>2014-05-16 16:56:34 +0000</bug_when>
    <thetext>Should there be an image smoothing option here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125529</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2016-03-16 14:18:42 +0000</bug_when>
    <thetext>https://github.com/whatwg/html/issues/865</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>