Solved

Save an image as a file directly from the clipboard

Posted on 2014-01-07
6
710 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
Comment Utility
#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 51

Accepted Solution

by:
Joe Winograd, EE MVE earned 300 total points
Comment Utility
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 82

Expert Comment

by:Dave Baldwin
Comment Utility
+99 for Irfanview.  I use it almost everyday and probably for every image I have posted here.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 80

Assisted Solution

by:byundt
byundt earned 100 total points
Comment Utility
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
Comment Utility
Thanks for the great suggestions and code.
0
 
LVL 51

Expert Comment

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

Brad,
That is a great piece of code!

Regards, Joe
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

762 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

11 Experts available now in Live!

Get 1:1 Help Now