Tagged Questions
240
votes
3answers
76k views
Using HTML5/Canvas/Javascript to take screenshots
Google's "Report a Bug" or "Feedback Tool" lets you select an area of your browser window to create a screenshot that is submitted with your feedback about a bug.
screenshot by Jason Small, posted ...
200
votes
8answers
109k views
Capture HTML Canvas as gif/jpg/png/pdf?
Is it possible to capture or print what's displayed in an html canvas as an image or pdf? I'd like to generate an image via canvas, and I'd like to be able to generate a png from that image.
128
votes
11answers
89k views
Resizing an image in an HTML5 canvas
I'm trying to create a thumbnail image on the client side using javascript and a canvas element, but when I shrink the image down, it looks terrible. It looks as if it was downsized in photoshop with ...
50
votes
7answers
22k views
Why does canvas.toDataURL() throw a security exception?
Did I not get enough sleep or what? This following code
var frame=document.getElementById("viewer");
frame.width=100;
frame.height=100;
var ctx=frame.getContext("2d");
var img=new Image();
...
42
votes
4answers
38k views
getPixel from HTML Canvas?
Is it possible to query a HTML Canvas object to get the color at a specific location?
94
votes
13answers
79k views
How do I get the coordinates of a mouse click on a canvas element?
What's the simplest way to add a click event handler to a canvas element that will return the x and y coordinates of the click (relative to the canvas element)?
No legacy browser compatibility ...
98
votes
15answers
18k views
What is the current state of the art in HTML canvas JavaScript libraries and frameworks? [closed]
I am currently investigating options for working with the canvas in a new HTML 5 application, and was wondering what is the current state of the art in HTML canvas JavaScript libraries and frameworks?
...
37
votes
10answers
25k views
Does HTML5/Canvas Support Double Buffering?
What I'd like to do is draw my graphics on a buffer and then be able to copy it as is to the canvas so I can do animation and avoid flickering. But I couldn't find this option. Anyone know how I can ...
57
votes
3answers
16k views
Html5 Canvas vs SVG vs div
What is the best way for element creation on the fly and being able to move it around?
Let's say I want to create rectangle, circle and polygon then I want to select the objects and move it around
...
171
votes
11answers
140k views
How to clear the canvas for redrawing
After experimenting with composite operations and drawing images on the canvas I'm now trying to remove images and compositing. How do I do this?
I need to clear the canvas for redrawing other ...
29
votes
3answers
16k views
Can I turn off antialiasing on an HTML <canvas> element?
I'm playing around with the <canvas> element, drawing lines and such.
I've noticed that my diagonal lines are antialiased. I'd prefer the jaggy look for what I'm doing - is there any way of ...
13
votes
3answers
10k views
Zoom Canvas to Mouse Cursor
I'm programming a HTML5 < canvas > project that involves zooming in and out of images using the scroll wheel.
I want to zoom towards the cursor like google maps does but I'm completely lost on how ...
20
votes
3answers
21k views
Uploading 'canvas' image data to the server
I need to upload the canvas image data to the server (database) on the fly, i.e., I need to create a form and with an input=file, and post the image data without any user interaction.
29
votes
11answers
21k views
Is there a way to curve / arc text using CSS3 / Canvas
I'm trying to curve text this effect using CSS3, HTML Canvas, or even SVG (see image below for example)? Is this possible? If so, how can I achieve this effect?
Update: To clarify: The text that will ...
13
votes
2answers
14k views
Get pixel color from canvas, on mouseover
Is it possible to get the RGB value pixel under the mouse? Is there a complete example of this? Here's what I have so far:
<script>
function draw() {
var ctx = ...