Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9206677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:13:33+00:00 2026-06-18T00:13:33+00:00

I am trying to use the technique shown here: http://joelb.me/blog/2011/code-snippet-accessing-clipboard-images-with-javascript/ to capture an image

  • 0

I am trying to use the technique shown here: http://joelb.me/blog/2011/code-snippet-accessing-clipboard-images-with-javascript/ to capture an image the user pastes onto the webpage. This is compatible with Chrome and Firefox.

Everything works well. The image data is supposed to be stored in pastedImage.src. I am able to display the image on the page (into an img element, or draw it on a canvas).

However, what gets stored in pastedImage.src differs in Chrome and Firefox. Firefox stores the actual image, in a base64 encoded data URL, which I can parse and upload; Chrome stores a temp URL in the form http://[domain]/%5Bstring%5D that does point to the image. Please see this here: http://test.vapenerd.com/paste.html

I can’t really figure out how to get the actual image data from that – I tried to a FileReader() on it, but it doesn’t seem to work.

Right now my workaround is to draw the image into a canvas and then get it using the toDataURL() method which returns a base64 encoded data URL.

I am sorry, I am not a web developer, hope this is not too confusing.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:13:34+00:00Added an answer on June 18, 2026 at 12:13 am

    Just read it as a data uri

    var reader = new FileReader();
    reader.onload = function(event){
        createImage(event.target.result);
    }; // data url!
    reader.readAsDataURL(blob);
    

    DEMO

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use the text-overflow: ellipsis technique introduced in this article: http://mattsnider.com/css/css-string-truncation-with-ellipsis/
I'm trying to use the following technique described on symfony.com : http://symfony.com/doc/current/cookbook/testing/http_authentication.html in an
I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
I am need paint my image. I'm trying use JQuery in here this link:
I am trying to use a common technique to create objects from Xml. (Xml
I am trying to use the 9-patch technique to create the button. It looks
I was trying to use BDD technique to check the import picture process using
I am trying to use the 'best practice' technique of using the FocusManager.GetFocusedElement() in
I'm trying to use the css sprites technique to recreate a good rollover effect.
I'm reading through TableView_iPhone tutorial from Apple and I'm trying to use 'The Technique

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.