Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I sometimes get ad-hoc bug reports from customers, which I need to transfer to our online bug tracker. Works fine for text, but pictures are tedious.

I'm looking for a solution to copy-paste images from documents (like excel sheets) in a way that if you paste an image to a file input (or text input) on a html page, the file will automatically be written to disk (tmp dir), and the path written to the file input field.

This question is related to Directly paste clipboard image into gmail message, but I would like to ask if there is a solution using a local program only. I'm interested in solutions for all operating systems.

share|improve this question
I think its not possible without third party softwares. – ukanth May 3 '10 at 10:24
Third party software is not a problem - I would just like to know if such software exists. – Alexander Torstling May 3 '10 at 10:54
If nobody finds such, I will make one.. Windows solution would be enough for me. – Pavel Radzivilovsky Jun 28 '10 at 10:04
Sounds like something autohotkey could do, though I'd have to look into how. Sounds like a great idea, though. – Phoshi Jun 28 '10 at 10:16
up vote 3 down vote accepted

Okay guys, This is what I did.

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace ClipSave
    class Program
        [STAThread] public static void Main()
            if (Clipboard.GetDataObject() != null)
                IDataObject data = Clipboard.GetDataObject();

                if (data.GetDataPresent(DataFormats.Bitmap))
                    Image image = (Image)data.GetData(DataFormats.Bitmap, true);
                    string file = System.Windows.Forms.Application.CommonAppDataPath + "\\ClipSaveImage.png";
                    image.Save(file, System.Drawing.Imaging.ImageFormat.Png);

                    MessageBox.Show("Copy valid image first");
                MessageBox.Show("Copy image first");

Compiled it to an EXE, added a start-up menu shortcut to it with a hotkey Ctrl+Shift+C. It then copies the current image in clipboard to a file and puts path to the file into the clipboard.

share|improve this answer
Sweet! Thanks very much. – Alexander Torstling Aug 12 '10 at 16:24
+10 if I could. – IsmailS Jun 24 '11 at 6:51

This AutoHotKey thread has an AutoHotKey script for taking a screenshot. It includes the source for a trivial .Net 1.1 program to save the clipboard to a PNG. You would want it to have a few other modifications:

  • Save the image to a different folder, with a name better than image.png
  • Copy the path to the new image to your clipboard

The AutoHotKey Clipboard commands are another way to access that data, though a program to get its image data would be a bit more complicated.

share|improve this answer

Not sure if i answering your question. but you can try out clipman. it helps you to copy everything and keep it aside until you select it back one by one. Clipman,source CNET

share|improve this answer
  • Right click the image and save it?
  • Drag the image to a folder?
  • Use the Snipping Tool and save it from there?

These three methods will let you save a file pretty quick. The File Explorer will always go to the same folder so quickly saving or uploading the file won't be a problem either...

The direct clipboard feature has been asked before and failed.

share|improve this answer
The image does not come from web. It's more than a right-click. Plus, I don't need many in a row. I need one, occasionally, for many people, at many stations. The exact use case is add a picture to fogbugz wiki. – Pavel Radzivilovsky Jun 30 '10 at 11:20
I don't understand this... You can just right click on an image in Word or Excel and click "Save This Picture". If the clipboard does not work, the fastest way is using one of the above methods or have someone write a add-on for Word or Excel that add a right menu option to directly upload to fogbugz. – Tom Wijsman Jun 30 '10 at 20:47

I am not familiar with Windows, but since you asked for solutions for all OSes, I have an applescript solution for Mac OS X that I have tested by copying a picture on this website and executing the script.

This applescript assumes the image is on the clipboard in TIFF format (might have to test to see if this is what comes out of Excel.) It creates the file from the clipboard, saves it to a temporary directory, then pastes the path into a specified field on the frontmost page in Safari.

So, you would copy the image, switch to your safari page, and run the script. (From the script menu, make it into a service and assign a shortcut, or use FastScripts to assign a shortcut to the applescript.)

The script will have to be adjusted to find the proper field on your form.

repeat with i in clipboard info

  if TIFF picture is in i then

    -- grab the picture from the clipboard, set up a filename based on date
    set tp to the clipboard as TIFF picture
    set dt to current date
    set dtstr to (time of dt as string) & ".tiff"
    set pt to ((path to temporary items from user domain as string) & dtstr)
    set tf to open for access file pt with write permission

    -- save the file
        write tp to tf
        close access tf
    on error
        close access tf
    end try

    -- put the path into the proper field in the web Browser
    tell application "Safari"

        -- adjust javascript as necessary
        -- currently inserts into Answer textarea of this page for testing
        -- ie. make sure you've clicked "add answer" first
        set myJS to "document.getElementById('wmd-input').value = '" & pt & "'"

        -- document 1 is frontmost
        do JavaScript myJS in document 1
    end tell

    exit repeat
  end if
end repeat

Edit: Things to consider:

  • I do nothing with the path, default delimiter is a colon. You may want the POSIX path.
  • Is it possible to change the javascript to execute a file upload javascript? (I have no experience with this, but I think it could be done.)
  • Excel supports applescript, and has a copy picture command. It may be feasible to do this in one step. Select picture, run script, script copies, saves, opens web page and fills out the form.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.