This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/ Multipage: http://www.whatwg.org/C#head Complete: http://www.whatwg.org/c#head Comment: I have idea for add URL.createObjectURL for ImageData objects. ImageData gets superpowers - he can be image in CSS background, <img> and other elements. ImageData can be animated, you can create unstandart image formats, custom animations and filters. Posted from: 95.188.224.22 by alexei03a@gmail.com User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1
I have idea for ImageData as image. For this, require make string link with URL.createObjectURL() in ImageData object.
Please, remove my first comment, because is outdated.
i.e. Description
The idea of using the image ImageData was given to me at once. At first I thought at all to use the Canvas element in the quality of content in images. But then I decided that the best solution is to use ImageData as images. Use it in CSS backgrounds, as well as in the src <img>. To create ImageData image to make a link to it: URL.createObjectURL(ctx.createImageData(w,h)); This is only a primitive use, this technique can be applied for decoding images, using filters, as well as animation and plug-ins. 1. ImageData is a fixed size 2. High performance (no encoding / decoding) 3. Security Policy (on getImageData) 4. ImageData object reference instead of Base64 encoded image in PNG (similar to the Blob) 5. Speaker (you can change the pixel, is it reflected in the image) 6. Generated only with scripts Writed on Google Translate.
Please, less noise when filing bugs. What is the problem you're trying to solve with your idea?
Will be very difficult to understand. The bottom line is that I want to make a plug in JavaScript, which can decode an image (for example APNG), but the result is we need a way to insert IMG etc. ToDataURL method has several disadvantages, such as the "static" and "a huge resource consumption." ImageData is flexible and does not expend resources (given the fact that it was rendering and exporting from Canvas), it can also be applied with the Worker. The fact is that in the language C, animation or image is constructed by analogy with ImageData. Also with ImageData can generate captcha-picture a trick. Problems of course is not enough, here are some of them: - Decoding images (rendering the result, I sort of wrote about above) - Filters for images (and not only) - Watermarks (protection from inexperienced users) - Manipulating pixels and animation (useful for first item) - Generated Image (RGBA32 and animation, though not necessarily) - Someone just for experimentation :)
For canvas (only) security addition: /!\ Drawing <img> element, with link of "ImageData" object, to HTMLCanvasElement must throw "Security Error", because draw first frame is unreal. For canvas, only ctx.putImageData, or long operation: temp.canvas.width = imagedata.width; temp.canvas.height = imagedata.height; temp.putImageData(imagedata,0,0); ctx.drawImage(temp.canvas, ...);
Same bug: https://bugzilla.mozilla.org/show_bug.cgi?id=783942 Simple example in HTML: https://bug783942.bugzilla.mozilla.org/attachment.cgi?id=653317
There is an important request - to prepare the specification and I myself can not. I have already suggested that we should do.
Testcase is outdated, looks: https://bug783942.bugzilla.mozilla.org/attachment.cgi?id=653739
Alexei03a . Please be more considerate of other peoples' time when posting comments to bugzilla. You posted 8 comment for this just one bug over the last day. That's excessive. Some of us get a separate notification every time you post a comment here. And most of them are not important comments.
There's a fundamental problem here. ImageData is mutable, while Blob and File are not. Creating URLs to ImageData objects could be racy.
This appears to be a new feature, so moving to HTML.next.
EDITOR'S RESPONSE: This is an Editor'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: Information Needed Rationale: This appears to be a new feature, so moving to HTML.next.
Finally, where to send the proposal to whatwg and w3c? The more URL.createObjectURL for ImageData's exactly the idea, suggestion.
If you wish to propose a feature to the WHATWG, please either file a bug on the WHATWG product, HTML component, or e-mail the list mentioned at: http://whatwg.org/mailing-list#specs
I still have not described the nature of the bug. And the essence of the bug is that the need to make it possible to use functions URL.createObjectURL to objects of type ImageData. You anywhere in the specifications about it did not say anything, because of what browsers do not support this (and will not be supported). I earlier said that ImageData will be very useful as an image. I apologize for not having provided any description or nature of things.
I use a translator from Google, and there may be some errors in the translation. I have to use the images ImageData see more good than harm. Any scripts are harmful to some extent. :)
I still give a lot of detail. Link to ImageData should look like this: [optional-browser-prefix]imagedata:[url][code] When the browser accesses this link in the ImageData object, that in turn, is drawn directly into the IMG, if there was a change of pixels, the image should also reflect this change. Should not be displayed immediately after each change, but only after a group of changes (short animation, FPS).
[url] i.e. site url.
From this and subsequent posts, I will write a copy of the text in Russian (which is the original). As it was better to write a new bug, or modify this? RUS: Как лучше было, написать новый баг, или модифицировать этот?
Created attachment 1177 [details] ImageData example (copy)
Created attachment 1178 [details] Description (Russian, adaptive)
You can already convert ImageData objects to URLs, just draw them to a canvas and them call toBlobURL on the canvas.