HSWAW fork of JSPaint https://pixel.label.hackerspace.pl
 
 
 
 
Go to file
Isaiah Odhner 05449000c2 Hide parts of the UI as the window gets smaller 2015-06-19 15:52:31 -04:00
images Better magnification chooser 2014-10-25 02:06:20 -04:00
lib Colors > Save Colors (as JSON) 2015-06-16 20:07:11 -04:00
src Hide parts of the UI as the window gets smaller 2015-06-19 15:52:31 -04:00
.gitignore nw.js desktop app 2015-04-05 13:10:02 -04:00
CNAME jspaint.ml 2014-10-01 17:41:45 -04:00
README.md Some keyboard support in the menus 2015-06-19 15:29:49 -04:00
TODO.md Hide parts of the UI as the window gets smaller 2015-06-19 15:52:31 -04:00
chrome-app.js Many minor code changes 2014-10-28 22:54:55 -04:00
classic.css Some keyboard support in the menus 2015-06-19 15:29:49 -04:00
index.html Colors > Save Colors (as JSON) 2015-06-16 20:07:11 -04:00
layout.css Hide parts of the UI as the window gets smaller 2015-06-19 15:52:31 -04:00
manifest.json nw.js desktop app 2015-04-05 13:10:02 -04:00
manifest.webapp Update TODO (and version number) 2014-11-20 08:51:24 -05:00
package.json nw.js desktop app 2015-04-05 13:10:02 -04:00
print.css Dock component windows with double click on titlebar 2014-10-28 02:04:41 -04:00

README.md

JS Paint

A nice web-based MS Paint remake and more... Try it out!

The goal is to remake MS Paint (including its little-known features), improve on it, and to extend the types of images it can edit. So far, it does this pretty well.

You can also install it as a Chrome app.

Screenshot

Current improvements include:

  • Unlimited undos/redos (as opposed to a measly 3 in Windows XP, or a somewhat less measly but still annoying 50 in Windows 7)
  • Automatically saves if local storage is allowed (Try refreshing the page to make sure, and to check it out)
  • Edit transparent images! To create a transparent image, go to Image > Attributes... and select Transparent, then Okay, and then Image > Clear Image
  • Create an animated GIF from the current document history with Ctrl+Shift+G (pretty nifty, you should try it out (after editing a fairly small image))
  • Cross-platform, I suppose
  • You can shoot at it Asteroids style
  • When you do Edit > Paste From... you can select transparent images and animated GIFs. You can even paste a transparent animated GIF and then hold Shift while dragging the selection to smear it across the canvas while it animates! Update: This was due to not-to-spec behavior in Chrome. See this blog post. I may reimplement this in the future as I really liked this feature.
  • It can open SVG files (by accident)
  • You can crop the image by making a selection while holding Ctrl
  • Keyboard shortcuts for rotation: Ctrl+. and Ctrl+, (</>)
  • Rotate image by arbitrary angle! Available in Image > Flip/Rotate
  • Rudimentary multiplayer support: Start up a session at jspaint.ml/#session:multiplayer-test and send the link to your friends! It isn't perfectly seamless, and you may lose your drawing or be interrupted.
  • Load many different palette formats with Colors > Get Colors (I made a library for this)

Possible improvements include:

  • Extended Editing
  • Mobile support
  • Proportionally resize the selection or canvas by holding Shift
  • After adding text, save as SVG or HTML with selectable text
  • Alt as a shortcut for the eyedropper, as long as it doesn't conflict with keyboard navigation of menus
  • Alternate themes (You can already style it with browser extensions like Stylebot or Stylish though!)
  • Noncontiguous fill (Probably by holding Shift when using the fill tool)
  • Optionally treat almost-equal colors as equal

A lot of stuff isn't done yet:

Clipboard support is somewhat limited. You can copy with Ctrl+C, cut with Ctrl+X, and paste with Ctrl+V, but data copied from JS Paint can only be pasted into other instances of JS Paint. There's apparently no way for web apps to properly copy image data to the clipboard. To use the clipboard menu items, you need to install the Chrome app. (It would be a huge security issue if browsers let web pages access the clipboard at will.)

Staying True to the Original

Ah yes, good old paint. Not the one with the ribbons or the new one with the interface that can take up nearly half the screen.

Windows 95, 98, and XP were the golden years of paint. You had a tool box and a color box, a foreground color and a background color, and that was all you needed.

Things were simple.

But now we want transparency. And we want to undo more than three actions. We can't just keep using the old paint.

So that's why I'm making JS Paint. I want to bring good old paint into the modern era. Also, it's totally retro. There might be themes later, though. What was this section titled? Oh, um yeah I'm doing that too, I guess.

Extended Editing

I want to make JS Paint to be able to edit...

  • Transparent PNGs - Done! Images that are partially transparent will automatically open in Transparent mode. Otherwise they will open in Opaque mode. Enable transparency for an image by going to Image > Attributes or pressing Ctrl+E and selecting Transparent. (Hit Okay.) Then you'll want to remove some of the background. You can use the Eraser tool a bit, then use the Color Picker to pick up where you erased and then use the Fill tool to remove bigger areas.
  • Animated GIFs (yes, that entails a fully featured (but simple) animation editor) - Currently you can only make GIFs of the document history with Ctrl+Shift+G
  • Animated Transparent APNGs (better than GIFs, but with less support)
  • Multi-size Icons (ICO for windows and ICNS for mac)
  • Scalable Vector Graphics (kidding) - Actually, it could always open SVG files in browsers that can handle SVGs, and I've made it try not to save over the original SVG. That's pretty decent SVG support, for a 100% raster image editor.
  • Text Files (definitely just kidding maybe)

Did you know?

  • You can drag the color box and tool box around if you grab them by the right place. You can even drag them out into little windows. You can dock the windows back to the side by double-clicking on their titlebars.

  • In addition to the left-click foreground color and the right-click background color, there's also a third color you can access by holding Ctrl while you draw. It starts out with no color so you'll need to hold Ctrl and select a color first. The slightly fancy thing about this color is you can press and release Ctrl to switch colors while drawing.

  • You can apply image transformations like Flip/Rotate, Stretch/Skew or Invert (in the Image menu) either to the whole image or to a selection. If you make a selection with the Select or Free-Form Select tool, the transformations apply to the selection.

  • These Tips and Tricks from a tutorial for MS Paint also work in JS Paint if they have a checkmark:

    • Brush Scaling (+ & - on the Numpad to adjust brush size)
    • "Custom Brushes" (hold Shift and drag the selection to smear it)
    • The 'Stamp' "Tool" (hold Shift and click the selection to stamp it)
    • Image Scaling (+ & - on the Numpad to scale the selection by factors of 2)
    • Color Replacement (right mouse button in Eraser selectively replaces the foreground color with the background color)
    • The Grid (Ctrl+G & Zoom to 6x+)
    • Quick Undo (Pressing a second mouse button cancels the action you were performing. I also made it redoable, in case you do it by accident!)
    • Scroll Wheel Bug (Hmm, let's maybe not recreate this?)