<?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>11517</bug_id>
          
          <creation_ts>2010-12-09 21:51:03 +0000</creation_ts>
          <short_desc>Since context.putImageData() does not handle compositing, another set of methods, maybe context.drawImageData(), should be created to allow ImageData objects to be drawn onto the canvas in the same fashion as Image objects.</short_desc>
          <delta_ts>2013-03-19 19:38:15 +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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>https://www.w3.org/Bugs/Public/show_bug.cgi?id=19052</bug_file_loc>
          <status_whiteboard>canvas RFE</status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>jackalmage</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
    
    <cc>warcraftthreeft</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>43225</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2010-12-09 21:51:03 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html
Section: http://www.whatwg.org/specs/web-apps/current-work/complete.html#pixel-manipulation

Comment:
Since context.putImageData() does not handle compositing, another set of
methods, maybe context.drawImageData(), should be created to allow ImageData
objects to be drawn onto the canvas in the same fashion as Image objects.

Posted from: 173.186.242.11</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43229</commentid>
    <comment_count>1</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2010-12-10 00:53:46 +0000</bug_when>
    <thetext>If you want to composite a whole canvas onto another canvas, you can just use the first canvas as an argument to drawImage().  If you want to composite a portion of a canvas onto another canvas, you can first use putImageData to draw the portion onto a *third*, appropriately sized, canvas, and then use drawImage with the third canvas.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44093</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-01-11 05:12:45 +0000</bug_when>
    <thetext>*** Bug 11565 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44094</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-01-11 05:14:14 +0000</bug_when>
    <thetext>bug 11565 had the following use case description:

---------
Usage scenario. You have a large image that you want to render a portion to the
screen without overwriting the whole canvas. (Pretend part of it is
transparent). You also want the ability to change pixel info quickly and
ImageData allows that.
---------

However, I don&apos;t really understand what that means.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44118</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-01-11 07:11:13 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: I discussed this with Sirisian (bug 11565&apos;s reporter) on IRC. In conclusion, it isn&apos;t clear to me that there is an urgent compelling need for this. I&apos;ve marked this bug LATER so that we can study it again in the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52784</commentid>
    <comment_count>5</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:04:12 +0000</bug_when>
    <thetext>mass-move component to LC1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64770</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-02-29 22:25:46 +0000</bug_when>
    <thetext>I&apos;ll look at this again when dealing with high-res putImageData().

In general though it&apos;s not clear to me why drawImage() isn&apos;t already sufficient here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64837</commentid>
    <comment_count>7</comment_count>
    <who name="Sirisian">warcraftthreeft</who>
    <bug_when>2012-03-01 17:34:02 +0000</bug_when>
    <thetext>I can&apos;t really remember why I suggested this. It was probably because of a performance problem when rendering images. That is to say the intended implementation of drawImageData would composite but only on integer values so as to not take the performance hit that drawImage has when the x and y values are rational and there is no transformation applied. However, a drawImage implementation could special case for that to draw faster so such a method for drawImageData seems pointless. The other perceived problem was handling of alpha values that are binary either on or off. drawImageData would ideally be designed to render only pixels with an alpha that isn&apos;t 0 so that no performance is lost due to a software blending function. That is to say the implementation of drawImageData would be identical to putImageData except it would not copy pixels that have an alpha value of 0. Kind of a random proposition for the sake of a sane and fast implementation. More of an edge case in the usage of canvas.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82032</commentid>
    <comment_count>8</comment_count>
    <who name="">public-rdfa-wg</who>
    <bug_when>2013-01-24 06:46:00 +0000</bug_when>
    <thetext>This bug was cloned to create HTML WG bug 19052.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84589</commentid>
    <comment_count>9</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-03-18 23:27:18 +0000</bug_when>
    <thetext>This got fixed as part of the ImageBitmap feature. Just create an ImageBitmap object from the ImageData object, and draw that onto the canvas.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84656</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-03-19 19:38:15 +0000</bug_when>
    <thetext>*** Bug 17960 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>