Solved

Save an image as a file directly from the clipboard

Posted on 2014-01-07
6
782 Views
Last Modified: 2014-01-23
Hello,

What is the quickest way in Windows (7) to make or save a file of an image which has been placed on the clipboard? For example:

    1) Pressing Ctrl+PrtScr saves an image of the entire screen to the clipboard so that when Paste (Ctrl+v) is pressed, the image is pasted into the current active application. Pressing Alt+PrtScr does the same thing but only with the current active window.

    2) Alternatively, one can use the Snipping Tool to capture a user-defined rectangular area on the screen. In this case, once the image is captured, the option is available to bame and save the image as a file.

What I am wondering is how to quickly or most quickly save the image captured in example #1 — or is it even possible to create a file out of something which is only on the clipboard but not on the screen?

The method I've used in the past (for #1) is to paste the saved image into Excel or Word, and then by right-clicking, go through the steps of saving the image. But is there a quicker or more direct approach than that?

Thanks
0
Comment
Question by:Steve_Brady
6 Comments
 
LVL 10

Assisted Solution

by:acbxyz
acbxyz earned 100 total points
ID: 39763692
#3) If you have an image in your clipboard and want to save it, please use an image program and save it as image. You've got at least paint for it. Don't make a big document or spread sheet from a simple image.

#1) With build in tools I don't know a way

#2) I use screenpresso which has a working directory and save all screen shots while creating. Besides full screen and specific window it can also snap only partial controls or tabs within a window.

#4) Have a look at this: http://www.mailsend-online.com/blog/auto-save-clipboard-images-redux.html
I bookmarked it a while ago but hadn't the time to test yet.
0
 
LVL 52

Accepted Solution

by:
Joe Winograd, EE MVE earned 300 total points
ID: 39763714
Hi Steve,

For your #1, my fav go-to app is the excellent (and free!) IrfanView, imaging software that I've been using for many years:
http://www.irfanview.com/

Click the Download link on the left to download IrfanView and click the PlugIns link on the left to download the PlugIns, which are needed to give you PDF capability (it's optional...only if you want PDF support...and the other features that come with the PlugIns). Install IrfanView first, then install the PlugIns (again, it's optional, but I think it's a good idea).

To do what you want, run IrfanView and click Ctrl-V (paste) – that's it! Save it to whatever file and file type you want (I typically use JPG). Although I love IrfanView, many programs will accept the Ctrl-V, even the built-in Paint applet.

For your #2, I set up my shortcut for the Snipping Tool to have a hotkey:

Snipping Tool hotkeyI chose the numeric keypad minus sign, since I don't generally use the numeric keypad, and that key is very convenient, sitting in the upper right corner. I do a lot of screenshots for EE posts and EE articles, so I like having the Snipping Tool one keystroke away...and then I just click the Save icon to save the file to a JPG.

In both cases, you get a JPG (or other image file format, if you prefer) directly, rather than going through Excel or Word. Btw, I wrote a couple of articles about embedding screenshots that you may (or may not) find helpful:

http://www.experts-exchange.com/Other/Miscellaneous/A_11952-How-to-Embed-Screenshots-in-Posts.html

http://www.experts-exchange.com/Other/Miscellaneous/A_12266-How-to-Embed-Screenshots-with-My-Personal-Knowledgebase.html

Regards, Joe
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39763820
+99 for Irfanview.  I use it almost everyday and probably for every image I have posted here.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 81

Assisted Solution

by:byundt
byundt earned 100 total points
ID: 39763906
Assuming that you are using Excel, here is a macro that will paste the clipboard contents to a cell just to the right of the usedrange, put it in a chart object and then export that chart object as an image file (.gif, .png, jpg, .jpe or .jpeg) using a user-specified file name. If the user specifies a path, it will be used. If not, the path will be the same as the active workbook.
Sub ExportClipboardToFile()
Dim cht As ChartObject
Dim sWidth As Single, sHeight As Single
Dim shp As ShapeRange
Dim celHome As Range, rg As Range
Dim flExtension As String, flName As String, flPath As String
On Error Resume Next
Set celHome = ActiveCell
flPath = ActiveWorkbook.path & Application.PathSeparator
flName = InputBox("Please enter the desired filename & extension to save clipboard image. Include the path if not same as activeworkbook.")
If flName <> "" Then
    flExtension = Mid("." & flName, InStrRev(flName, ".") + 2)
    If IsError(Application.Match(flExtension, Array("gif", "png", "jpg", "jpe", "jpeg"), 0)) Then
        MsgBox "File name must include extension .gif, .png, jpg, .jpe or .jpeg"
    Else
        If InStr(1, flName, Application.PathSeparator) = 0 Then flName = flPath & flName    'flName doesn't include the path, so add it
        
        Application.ScreenUpdating = False
        With ActiveSheet
            Set rg = .UsedRange
            Set rg = rg.Cells(1, 1).Offset(0, rg.Columns.Count)
            rg.Select
            SendKeys "^v"
            DoEvents
            Application.Wait Now + TimeValue("00:00:01")
        
            sWidth = Selection.Width
            sHeight = Selection.Height
            Selection.Delete
        
            Set cht = .ChartObjects.Add(rg.Left, rg.Top, sWidth + 10, sHeight + 10)
            With cht
              .Chart.Paste
              .Chart.Export flName
              .Delete
            End With
            rg.EntireColumn.Delete
            Application.Goto celHome
        End With
    End If
End If
End Sub

Open in new window

0
 

Author Closing Comment

by:Steve_Brady
ID: 39804151
Thanks for the great suggestions and code.
0
 
LVL 52

Expert Comment

by:Joe Winograd, EE MVE
ID: 39804190
Steve,
You're welcome. As always, happy to help.

Brad,
That is a great piece of code!

Regards, Joe
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sort list of IP addresses 7 40
Windows 10 Mail Sync Error 6 30
Change default action for unrecognized file type 2 14
Problem to picture file 20 34
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now