Emulating Photoshop color levels in AS3 - actionscript-3

I'm making an app in which I need to make some photo effects similar to Instagram's effects. I was wondering if it's possible to somehow emulate the work of Photoshop's color levels in AS3.
I've tried using AdjustColor, ColorMatrixFilter and ColorTransform classes but desired image is very hard to achieve using those.
So does anyone have a solution easier than that? or maybe someone knows a library that I couldn't find on Google?

You should have a look at Joa's image processing library.

Have a look on this library:
http://peternitsch.net/bitmapdata.js/
This is actually implemented in Javascript, but it's based on the Flash API. All You need is there. Or i can recommend Foundation ActionScript 3.0 Image Effects by Todd Yard.
Flash API reference is another good resource for inspiration.
There is another good resource for pixel manipulation found here: http://evanw.github.com/webgl-filter/. This is done in WebGL but if your target API is still Flash, then you can easily transposed the GLSL language into Pixelbender and inject the shader
into the Flash by making reference to the pbj file.

Check Grant Skinner's TweenMax plugins, especially ColorMatrixFilter.

Related

3d objects in actionscript 3 without plugins

I am fairly new to actionscript and was wondering is it possible to create 3d shapes (cones, spheres, cubes) using actionscript.
I would like not to have to use a plugin.
The shapes must be 3d as I need to rotate them.
Here you will find Adobes documentation for what you are looking for:
http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS7D38179D-58B9-409c-9E5C-257DDECB1A02.html
Is there any specific reason that you don't want to use 3D libraries like away3D?
I think Matej's answer does not fully cover the topic as the link he gave only describes a classic display list approach to drawing 3D objects. Depending on your needs, drawing things using classic display list can be slow, as it is not GPU accelerated. If you want to utilize your GPU you can use Stage3D APIs - that does not require any external frameworks. Here's an excellent article for starters.
And even though you can render 3D content using 'raw' Context3D, I`d recommend using a framework like Away3D or Alternativa3D. Both are open source, by the way.

ActionScript 3 - Can you manipulate a 3d object using AS

I have seen tutorials on creating a 3d character in flash. Is there a way to manipulate (animate and move) this 3d character with actionscript 3? If so, could you guide me with some links?
Thanks
You will need to do a bit of reading up on a 3rd party library to help you to achieve this. One such library is Away 3D which can be used to manipulate 3d characters in Flash.
The process goes like:
Build a model in a 3D package
Load it in to away3d
I am not certain but I think animations are supported in a Collada file but its moving so fast that maybe other formats are supported. I know they were working on their own format.
Anyway if you head over there and maybe post on their forums or look at some of the examples, you should get the idea.

html5 canvas paint application

I'm working on a paint application with canvas, and trying to make some better tools.
now i have one tool that only connects lines while following the mouse movement.
can you think of a good tutorial or a good idea for other tools like spary, or brush?
thanks
You might find the following resources useful:
Create a Drawing App with HTML5 Canvas and JavaScript
Create a Paint Bucket Tool in HTML5 and JavaScript
Overview of JavaScript Application Development - Case CanvasDraw
Presentation - Intro to HTML5 Canvas
Feel free to contact me if you need more specific pointers. I think those above should at least help you to get started. :)
Please have a look at this code project article.
it may be useful to you.
http://www.codeproject.com/Articles/427422/Paint-Brush-Application-Using-HTML5-Canvas
thanks
I don't have a tutorial, but I think you should simply use thicker lines to create a brush tool.
A spray tool could draw random points in a circle with random alpha(that's quite easy to implement), but that might be extremely slow on some browsers. Drawing using pre-generated images would be much better but harder to implement.

Html5 Canvas animations

I am looking to get into learning how to use the html5 canvas to do animations as well as other things. I have an excellent knowledge of javascript and programming in general (mostly php but can adapt to anything). However, I have not had the opportunity to do much with graphics in the past. I have created nice smooth animations using javascript/jquery but the canvas object seems to be alot more than just that. The hardest part I am finding as I have been playing with it is that you have no reference to an object on the stage unless you store the reference. For example if I create a div on the page I have that reference to the object. However, with the canvas object if you create something within it, it draws that element on the stage giving you no reference to it. So you have to manually store the details of that object as I understand it and I could be wrong (if I am please correct me).
Anyways the whole point of this post is to see if anyone can point me to some really good articles/help about working with the canvas object. Not just drawing graphics to it cause I have been able to accomplish that very easily. But I would like to articles/help on managing the objects on the canvas. I want to make sure that I am doing this correctly/efficiently for the future of the technology. Also I am willing to purchase a book on working with html5 canvas/graphics/animations but most of them that I have seen go over the whole scope of html5 and leave out alot of the details of actually working with the canvas. So if you know any good books with my requirements please recommend them here.
Any help is appreciated.
There are nice libraries to do very basic to complex graphics using HTML5/WebGL
This may not actually teach you how the animations work. But if you are interested, check Three.js
https://github.com/mrdoob/three.js/
Read article "Creating a Framework For Canvas: Objects and Mouse". Not animation, but you can find there something interestring.
Read source code of any big framework, e.h. three.js, or LibCanvas
Read "HTML5 Canvas - Native Interactivity and Animation for the Web"

Can you suggest a canvas library capable of SIMPLE 3d

What I need to do is create a simple preview of a minecraft "dude" with the correct texture applied.
I'm not concerned with complex animations (yet) or detailed lighting (yet) but I'd like to make it using canvas and not rely on WebGL(not really that widely supported yet).
What technologies would you recommend for this set of limitations?
Ah, also, I don't need to edit or save the skin or whatever, just a simple display.
THREE.js is a popular javascript 3D library, it supports both canvas and WebGL