2

I have this idea for a imageshack style photo uploading service where you can paste a printscreen and then crop it in your browser. Is it possible to take the image from the clipboard into the browser?

Trott
  • 66,479
  • 23
  • 173
  • 212
Maynza
  • 748
  • 5
  • 18
  • 6
    http://stackoverflow.com/questions/490908/paste-an-image-from-clipboard-using-java-script – jimyi Aug 15 '09 at 04:16
  • Thanks alot, http://lassebunk.dk/2009/07/19/using-the-clipboard-to-post-images/ looks really promising. – Maynza Aug 15 '09 at 04:23

3 Answers3

0

I don't believe it is.

Noon Silk
  • 54,084
  • 6
  • 88
  • 105
0

By default, most browsers do not allow Javascript to access the clipboard -- for instance, what if you pasted in your password to log in to a site, then someone injected a script that read the same password you use on all your sites?

Trephine is a library for browser clipboard access, and even they claim to only grab text. Moreover, I'm halfway sure that the OS decides whether to paste anything into a given application (you can't paste a screenshot into Notepad AFAIK).

So like that link in the comments above, you might have to go Java or Flash for this. It looks like AIR might let you read images from the clipboard?

Mark Rushakoff
  • 249,864
  • 45
  • 407
  • 398
0

No, to my knowledge it is not possible to access bitmaps from the clipbpoard. That's why at Aviary.com we built or own Firefox and Chrome extension called "Talon" to allow this kind of access: http://aviary.com/launch/talon - our Flash applications can talk via Javascript to the extension and get access to the bitmaps.

Quasimondo
  • 2,485
  • 1
  • 22
  • 30