I’ve decided to dust off my blog for 2017 and I’ve switched away from WordPress to a static website generator, Jekyll… find out more
Category Archives: Uncategorized
As a followup to my earlier articles, “How You Can Do Cool Image Effects Using HTML5 Canvas” and “How You Can Build an HTML5 Photobooth App“. In these earlier articles, I provided code for a number of separable color filters: grayscale, sepia, red, brighter, darker. All of these filters are classified as color filters where the output value for each pixel relies solely on the input state of the same pixel. It turns out that all of these color filters can all be modeled by a single data driven filter called a Color Matrix Filter which I’ll cover in this article. This filter takes as input a “color matrix” that contains weights (or coefficients) that determine how the output for a given color component relates to the other color components on input.
You’d Love to Draw and Animate using the HTML5 Canvas API. Maybe you want to be able to write an HTML5 game? Or maybe you want to add image editing to your latest web app? Or maybe you’ve just heard a lot about the HTML5 Canvas API and want to learn about it?
Need to automate pulling some data from a web page? Or want to mash up some unstructured data from a blog post with another data source. No API for getting at the data… !@#$@#$… No Problem… Web scraping to the rescue. What is web scraping?… you may be asking… Web scraping consists of programmatically (typically with no browser involved) retrieving the contents of web pages and extracting data from them.
- Easy fullscreen canvas apps with auto resizing
- Mouse event support
- Mouse coordinates normalized to canvas coordinates
- Key event support
- Animation timer
Demos after the link…
Maybe you’ve heard of the HTML 5 Canvas API, but don’t know what it’s good for…? Maybe you’ve heard that it’s the way to go if you want to code an HTML5 game? Or maybe you’ve heard that it gives you explicit control over drawing in your browser? So what does all that mean?… Just what is the HTML5 Canvas API?
Let me pull back the curtain a little for you and give you some insight into what the HTML5 Canvas API is all about and what it can do for you and your web apps.
In this article, I’m going to give an introductory overview of the HTML5 Canvas API. The sample application that comes with this article, “Canvas Playground”, gives a number of canvas drawing examples and even lets you interactively play around with the Canvas API. Give it a try.
You want the users of your web app to be able to use their webcam to take their own profile shots and you’d like them to be able to personalize or stylize the picture before uploading it your weberver. Or maybe you’ve seen one of those fun photobooth-type apps that takes photos, applies cool image effects to them and lets you share them… wondering how they worked.
Imagine if your HTML5 app could programmatically access your webcam, take snapshots and modify the image data procedurally. You could then let your user’s upload or share their self portraits.
In this article, I’m going to teach you how to do that and more. Building on some articles that I’ve shared in the past, I’ll walk you through a sample application that displays the video from your webcam, applies image processing effects to that video, lets you take still snapshots of the filtered video and lets you serialize the snapshots so that they can be uploaded to a web server.
Argh!!… Your web application has to sort a lot of data and you get the dreaded error message… “A script on this page may be busy, or it may have stopped responding…” Or maybe you’re writing some image processing code that takes forever on large images… Your UI is non-responsive. What are you going to do!!?… You could try to break up the work into small pieces and use timers to spread out the work. But what a PITA!
You need to know how image filters work! You’re writing an HTML5 application that works with images and you’d like to let your users dynamically alter the brightness of their images. Or maybe you’d like them to be able to give their image a vintage look…. or convert it to black and white to give that sense of drama…