Question: Is there a javascript library to draw images directly in the browser and save them to png or jpeg?

I want to use an alternative to services like aviary.com, pixlr.com and sumopaint.com and dont want to rely on third-party services and apis like these ones.

Is processingjs the right solution? I want a solution that works everywhere so please no nodejs and so on.

I need tools like a brush, paintbrush, pencil, layers, filters and so on - just like the real photoshop.

Answer: 
Look at this:

```
person.instance_of?(Person) #=> true
Person.instance_of?(Class)  #=> true

```

You have defined an instance method `add_accessor` for all the instances of the class `Class`, so `Person` class can use that method because it is an instance of `Class`.

I recommend yout to take a look at [metaprogramming](https://stackoverflow.com/questions/788689/ruby-metaprogramming-online-tutorial) and Ruby Object Model.

Hoep this helps
because Person (with capital P ) is an instance of the class Class.