How to save a new jpg image from the clipboard

It seems like it should be simple but I can't find anywhere this has been documented.
I have an image on the clipboard and simply want to save it as a new image.
I've been using Image Events and I can get a file saved but it's always empty.
Can someone please post some sample code to do this?

I'm sure there's a more elegant way to script this, but here is a script I just wrote real quick that should at least give you a start to an alternate way of dealing with clipboard data without having to launch Preview...
<pre style="width:630px;height:auto;overflow-x:auto;overflow-y:hidden;"
title="Copy this code and paste it into your Script Editor application.">--see if clipboard is a file
set filePath to ""
try
set clipPath to the clipboard as «class furl»
set filePath to clipPath as alias
end try
if filePath is not "" then
set newFile to getFileName("copied")
do shell script "cp " & quoted form of POSIX path of filePath & ¬
space & quoted form of POSIX path of newFile
return --end
end if
--see if clipboard is image data
set jpegDATA to ""
try
set jpegDATA to the clipboard as JPEG picture
end try
if jpegDATA is not "" then
set newFile to getFileName("new")
set theFile to open for access newFile with write permission
write jpegDATA to theFile
close access theFile
return --end
end if
beep 1
display dialog ¬
"No file or image data found on the clipboard." with icon ¬
note buttons {"Whatever"} default button 1
on getFileName(type)
choose file name with prompt ¬
"Select a name and location for the " & type & ¬
" jpeg:" default location (path to desktop) default name ¬
type & ".jpg"
end getFileName</pre>
Hope this helps...

Similar Messages

  • How do I create a JPG image from a clip

    I need to create a jpg image from a movie clip. Is making a freeze frame the same and creating a jpg?

    A jpg image is saved by FCE in a new file, while a freeze frame in FCE is a still picture used for a sequence in a project, but not saved separately.
    To make a jpg, position the playhead in the timeline on the frame you want to save and Export/Using QuickTime Conversion and select Format: Still Image.
    You are asked for a file name.
    To make a freeze frame, position the playhead in the timeline on the frame you want to reuse within the project and Modify/Make Freeze Frame. This leaves a new still in the viewer: you can drag it to the timeline, drag it to the browser, etc.. - However this does not create a separate file but stays embedded in the project where it is used.
    Piero

  • How can I erase images from the clipboard while using ink and slide or sketches and lines apps?

    I've been having trouble with my clipboard while using my adobe ink. Is there any way I can erase the images saved on the clipboard, because have been trying and I can't find a way to do it, it seems like the only option is by turning the selection into favorites and then a trashcan icon appears, but even if I choose delete it will only be erased from the clipboard favorites while remaining on the clipboard.
    I've thought erasing the sketches App, or deleting the project but I don't want to risk losing my work.
    Thanks!

    I posed a similar question in the Draw forum and got this reply:
    Re: How to clear the clipboard and empty drawings ?
    In short: you can't erase those clippings, at least not currently.

  • How do i store and fetch image from the Database(Access)

    i am facing one problem in inserting the image into the database.the steps i followed as
    1)i have created one database(access) as "Image" and into that one table as "Image" and field as "image"
    type of the field is ole object.
    2)i have inserted one image into the image field through "database.vi"
    3)now i am trying to get the image from the database by "Fetching Example.vi"
    4)it will succesfully retrieve the image from that field .
    5)but when i close the both programs and reopen those that time i am unable to get retrieve the image.
    Attachments:
    Add_to_Database.vi ‏78 KB
    Fetch_from_database.vi ‏67 KB

    I would like to suggest different approach for saving the images in the database.
    I was working on Medical Imaging Company. The way we save the images in real-time was by writing the name and path of the images to database.
    The images themselves where saved directly to disk.
    I don�t think that access is very good in taking care of GBytes of data.
    It happens some time that the database gets damage. If you have the images separately you can create fix procedure. (We had one).
    Good Lack,
    Amit Shachaf,

  • New to using Firefox with MAC: How does one save a single jpeg image from the web (as in a right click on a pc?)

    New to using Firefox with MAC: How does one save a single jpeg from the internet, similar to using the right mouse click on a pc?

    If your question comes about because you have a single button mouse, it's time to visit your local computer store and get a ''real'' mouse for that MAC. I don't "get" Apple, they sell their hardware for almost twice what a comparable PC would sell for - and then they leave out what is probably the most important time saving control, the right-button.
    See this for setting the hidden pref for context menus in Firefox, for Mac's.
    http://kb.mozillazine.org/Ui.click_hold_context_menus
    type '''about:config''' in the URL bar and hit Enter
    Pref Name = '''ui.click_hold_context_menus'''
    Double-click to Toggle to '''True'''

  • How do i place a jpg image from scanner into InDesign without it getting pixelated?

    Hello,
    I am currently working on my internship portfolio. So far so good but in the end on one of the last pages I wanted to attach the recommendations I got from teachers. 2 of them I received in .pdf and simply imported they look like from the pdf. The other 2 I received from teachers by e-mail 1 of them scanned in jpg. and another one scanned in pdf. I tried everything and still cant understand why the 2 scanned images become so pixelated once I export the entire file
    PS:  there are way more complicated pictures and architectural drawings which look great... the only problem are the scanned fil
    Thank you in Advance for your help

    Hey
    Thank you for the respond 1st of all. Thats the problem Im not having the paper filer or the originals.... Teachers wrote the recommendations, than print them, sign the paper files and scan them. Then sent them to me. Thats all I got. The thing is that the files are relatively Ok, imported in ID they also look ok... then when I want to export to interractive pdf the entire ID file they lool like sh*t

  • Dashboard flickr image removal.  How do I remove a flickr image from the Dashboard?!

    I forgot how I managed to creat a little image window with someone's flickr image into my Dashboard, but now I can't get rid of it.  The image has no live links only an edit button that allows you to move the image within its box.  I tried going to flickr to see if any images had the option of importing them to the Dashboard, but that isn't an option.....how the heck I got it to the Dashboard in the first place I don't remember.  Regardless I want the image gone and it doesn't have delete to remove it.  Help!

    If you really mean Dashboard, that's where your widgets are, in which case you hit the plus key ( + ) in the lower left corner and then click the X on the widget you want to delete. But if you meant the Dock, you click and drag it off and it disappears in a puff of smoke.

  • How To Save Modified Fields After query From The Database

    I Have This Customer Information Form That's Sort of an Ordering Forms , I Made It By LiveCycle v9.0
    And I Want To be able to search for Specific Record and Modify it and Save It Again to The DataBase
    I believe That We All Saw The (( Data Connected Forms Presentation )) For Pual Guerette
    At One Part Of The Presentation (Minute 0:26:00 specifically) When He Try To Search A Specific Record In the Database
    And He Got all this annoying Messages Then The Record what He looking Shows up ; He Said That We No Longer able to Modify The Record After We Doing the Search
    My First Question Is Why ???
    Is there anyway After I got that Specific Record I Want from the Database I Can make my modification on it and update it Back in the DB.
    OR i Have to Browse the whole DB looking for it Specially that I got this (ID Auto Increasment Number field Issue) Which leads me to ;
    My Second Qustion;
    Why I Can't just connect ''The Form Order Number'' to an Auto Increasment Number field in the DB
    Obviously i can't, So Can I do Anything to achieve this goal ??
    I Believe that we can Find some scripting to make that Happen 
    I Will Be So Grateful If There Is Any Helpful Answer
    FYI: I'm Not Java Expert So If There Is any Coding That's Can be Helpful Please POST ALL OF IT if you can ,,,,

    Hi,
    The information there is excellent and I would strongly recommend it.
    I don't have any public database examples and I am not inclined to spend time preparing an example if you are not prepared to read up on the methods.
    Stefan's site is the only link I have for databases.
    Good luck,
    Niall

  • How to save only newly added elements from the trailing list

    Dear,
    I have a shuttle bean with left and right trailing lists.
    At some point I save the right trailing list content to DB. Then I add additinal elements to the trailing list. Trying to save again gives me oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key
    exception.
    What is the approach I can take to only save newly added elements from the shuttle?
    I am wondering if I can put the extra logic (what logic would that be - do I need to check the PK value that is already in the database?) in the AM method with which I save the shuttle like here (TicketID and ResponsibilityID are primary key)
    if (items != null)
    Object ia[] = items.toArray();
    for(int i=1; i<ia.length; i++)
    Row rowApproval = vo.createRow();
    vo.insertRow(rowApproval);
    rowApproval.setNewRowState(Row.STATUS_INITIALIZED);
    Row row = vo.getCurrentRow();
    row.setAttribute("TicketId",items.get(0));
    row.setAttribute("ResponsibilityId",items.get(i) );
    row.setAttribute("Status",items.get(i));
    or should I do something in the EO?
    Thank you
    Anatoliy

    Hi,
    Can you please clarify - do I have to make a loop? I mean for every record/element in the trailing list
    I run the VO (that I will create) VO.executeQuery?Yes you do need to execute the VO for every record....by passing the different parameter in each iteration.
    Regards,
    Gyan

  • How to paste pictures, images from the clipboard

    Hey all,
    I've made a java-application and with a click on a button, I jump to a drawprogram.
    When I've finished my picture, copied it to the clipboard(ctrl c), I want to show it in my application.
    How can I do this and in which component must I paste it?
    Thanks

    There isn't a way to do it that is part of Lightroom. There is a plug-in that might help you, though. Check it out here: Locktastic
    It doesn't say if its compatible with LR4, but you can try it to find out.
    Plug-ins aren't usually as efficient as built-in functionality (like PM), but it might be a solution for you.

  • How do I save content (such as images) from the Firefox browser in Firefox OS?

    I recently received my ZTE Open, and I was looking at customization options for the OS. First step: find a new background for the home screen. In order to do so I was trying to save an image (just something on imgur) but after the image was loading in the browser on the phone, I had no way of downloading / saving the image. In Android I would normally long-press on the image and it would give me the option to save-as, but not in FirefoxOS.
    Is this something that I can do? If so, how?

    It is not possible to download at this moment. You can download the picture and save it on the computer and then transfer it to a microSD card.
    Add: I have also just filed a bug for this.

  • After upgrade to ff14, how do i move "new tab" button from the left to the right?

    after i upgraded to ff 14, i found that the "open new tab" button moved to the left of the tabs. how do i move the button back to the right of tabs?
    i've tried the customize, but it won't stay on the right when i hit done.

    Try to click the "Restore Default Set" button in the Customize window if you can't move the New Tab button to its default position immediately to the right of the last tab.
    You can also check for problems with the localstore.rdf file.
    *http://kb.mozillazine.org/Corrupt_localstore.rdf
    *https://support.mozilla.org/kb/Toolbar+keeps+resetting

  • How to launch a new terminal window from the current Finder folder?

    Hello. I would like to have something like "DOS prompt here" menu item on the Finder popup menu, so that when I click it a new Terminal window is open and set to the respective directory.
    Any ideas?

    I don't know of a way to do that... You might be able to use FruitMenu
    http://www.unsanity.com/haxies/fruitmenu
    and create a script to launch for the contextual menu that does what you want.
    I just open Terminal (by clicking the icon on the Dock), type "cd " and drag the icon of the folder I want to go to to the terminal window (and Return). It's a few steps but not that bad.

  • How to view tagged images from the camera in Lightroom?

    How do I see a tagged image from the camera (tagged using the lock button, to remind me of a image I want to find quickly) once imported into Lightroom? This is possible to do in Photomechanic, as I can see all of the tagged images from the camera once opened in Photomechanic. Yet so far I have not found a way to allow me to do this in Lightroom so far. Any solutions welcome please.

    There isn't a way to do it that is part of Lightroom. There is a plug-in that might help you, though. Check it out here: Locktastic
    It doesn't say if its compatible with LR4, but you can try it to find out.
    Plug-ins aren't usually as efficient as built-in functionality (like PM), but it might be a solution for you.

  • Why can't I resize jpg images in the applet?

    I used this code to display images in an html page. One applet for one image. But out of the 8 images I loaded, 6 adjusted themselves to 320x240 automatically, 1 randomly jumps around to certain parts of the image every 250millisecs, and 1 just cuts the top left hand part of 320x240. How can .jpg files give 3 different situations? I tried using the resize() method in the code but it doesn't do anything! How can I size those .jpg images to the size I want?
    /**This video stream applet loads a new image every 250ms
    import java.applet.*;
    import java.awt.*;
    import java.net.*;
    import java.io.*;
    import java.awt.event.*;
    public class Video extends Applet implements Runnable{
    private Image img,buffer;
    private Thread video = null;
    private URL url;
    private MediaTracker tracker;
    public synchronized void init(){
    tracker = new MediaTracker(this);
    try{url = new URL(getCodeBase(),"Camera1.jpg");}
    catch(MalformedURLException e){}
    img = getImage(url);
    tracker.addImage(img, 0);
    buffer = createImage(320,240);
    resize(320,240);
    if(video!=null)return;
    video = new Thread(this,"VideoStream");
    video.start();
    public synchronized void destroy(){
    if(video!=null)video=null;
    public void run(){
    while(!Thread.interrupted()){
    // Load new image.
    try{tracker.waitForID(0);}
    catch(InterruptedException e){}
    // Draw new Image.
    repaint();
    // Remove old image & add new one.
    tracker.removeImage(img,0);
    img.flush();
    tracker.addImage(img,0);
    // Sleep
    try{Thread.sleep(250);}
    catch(InterruptedException e){}
    public synchronized void update(Graphics g){
    Graphics bufGraph = buffer.getGraphics();
    bufGraph.drawImage(img,0,0,this);
    paint(bufGraph);
    g.drawImage(buffer,0,0,this);
    public void paint(Graphics g){
    g.drawImage(buffer,0,0,this);
    Also how can I add more than 1 .jpg in an applet since the applet tag for html is
    <applet code = Video.class width =... height = ...>
    <param name = "buffer" value = "Camera1.jpg"> ...and I can only put
    </applet> one file for "value
    Thanks a lot for ur help!

    you may try the function getScaledInstance(int,int,int) in Class Image.
    the first and second parameters are the width and height you want,the third parameter is hints-flags to indicate the type of algorithm to use for image resampling.

Maybe you are looking for

  • How do I remove e-mail address that appear in the drop down menu?

    When I enter an e-mail address the system offers me choices.  For most all of my address there are duplicates.  Also showing up is e-mail address that were typed incorrectly. When I go to Mail>Window>Previous Recipients there are no duplicates. No du

  • Can you have a calculated column in a table not a view?

    We have a table which contains a series of rows Key   Effective Date   Value 1       10/Feb/2006     123 1       23/Oct/2006      456 ...We have a requirement to store an indicator that tells us which row is the most current and what the end date of

  • Macbook Pro OS X Snow Leopard and CS2 upgrade and CS5?

    Hi everyone, I am a newbie and would love to hear some thoughts on this. I currently have the Adobe CS2 which I use on my toshiba. but all that is about to change because I recently got a macbook pro that runs on Snow lepoard. I have read some of the

  • Is there a way to file share between an iMac and iPad?

    I'm curious as to whether or not you can file share between an iPad and an iMac.  The main reason would be in case my wife or I were working on something on the iMac downstairs, we could "pull it up" on the iPad upstairs without having to sync it wit

  • OCS 10.1.2.2. on Win2003ServerR2 - Calendar Notifications - Mail hangs

    Hello, I'm running OCS 10.1.2.2 on a windows 2003 Server R2 box. If I create a new appointment or meeting in Calendar, including mail notifications to the participants, the whole email application becomes unusable. Or, better, it is apparently OK but