300dpi Image: copy to clipboard??

Hi everybody,
I have somewhat like a problem:
I set up something like a picture album with director.
Also there is a function to copy a selected image to the
clipboard in order to import it into PowerPoint.
Now, the original images have a resolution of 300dpi, but
when I copy it to the clipboard, they turn out to have only 72dpi
but HUGE dimensions.
My question:
- Is it possible at all for director to put JPGs into the
Clipboard with a resoltion of 300dpi???
- Is there an Xtra I could use for it?
THANKS SO MUCH!!
Jonas

    public static void writeToClipboard(Image image) {
        ImageSelection imageSelection =
            new ImageSelection(image);
        Toolkit.getDefaultToolkit().getSystemClipboard().setContents(imageSelection, null);
    public static class ImageSelection implements Transferable {
        // the Image object which will be housed by the ImageSelection
        private Image image;
        public ImageSelection(Image image) {
            this.image = image;
        // Returns the supported flavors of our implementation
        public DataFlavor[] getTransferDataFlavors() {
            return new DataFlavor[] {DataFlavor.imageFlavor};
        // Returns true if flavor is supported
        public boolean isDataFlavorSupported(DataFlavor flavor) {
            return DataFlavor.imageFlavor.equals(flavor);
        // Returns Image object housed by Transferable object
        public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException,IOException {
            if (!DataFlavor.imageFlavor.equals(flavor)) {
                throw new UnsupportedFlavorException(flavor);
            // else return the payload
            return image;
    }

Similar Messages

  • Copy ImageField Images to the clipboard

    We've created ImageFields in a pdf to for people to send into us.
    However we would like to be able to take those images and copy and paste them into other things. emails for example.
    right now the ImageField only lets you click it to add an image. We can't select or right click that image to copy it to the clipboard.
    is there a way to setup a button or something that via javascript or some other way allow us to copy that image to the clipboard?

    Hi,
    to copy an image to the clipboard you can use the snapshopt tool from Acrobats or Readers Edit menu.
    There is no other way I'm afraid.

  • I want to copy an image to the clipboard in firefox using firefox clipboard API

    I Want to copy an image to the clipboard using firefox clipboard API.
    Please let me know he steps

    Thanks for the reply, but I want to copy the IMAGE to the clipboard programmatically in javascript using firefox clipboard API.
    For ex using the following syntax:
    var clip = Components.classes'@mozilla.org/widget/clipboard;1']
    I am able to copy the text, but I don't know the syntax to copy the IMAGE.

  • Copy and paste a image to the clipboard

    Hi,
    Is there anybody who knows how to copy and paste an image to the clipboard in jdk 1.3.0.
    I want make a image copy of my app like this (Panel):
    Image image = (Image)this.createImage(this.getWidth(), this.getHeight());
    Graphics g = image.getGraphics();
    this.paint(g);
    BufferedImage bufImage = (BufferedImage)image;
    Now i will send this bufImage or the image to the clipboard.
    How will it works?
    Thanks a lot.

    Hi,
    I m having similar type of problem but with JPanel not with image. i m able to copy paste a JPanel using same clipboard but i want some more operations like after zoomin my JPanel , i want that now if i copy the image of Jpanel it should be the copy of original size of JPanel not the zoomed one but in my application it is showing the blank picture
    for zoom fit size of JPanel its working ok.
    please advice me what should i do

  • Paste is only pasting a text field instead of an image copied to the clipboard from another program like mail or safari?

    The latest version of Keynote only pastes a blank text field after copying an image to the clipboard in other applications like mail or Safari.  The previous version worked fine with copying and pasting images.  Saving the image to a file and then inserting the image file is the only work-a-round I have found so far.

    To place an image on a slide, use Finder to drag and drop the file onto the slide.

  • Pasting Image  from Mac clipboard to Java Based Application.

    Hi,
    I am working on "iMac 10.2.7". I need to paste an image from other
    application using "Java version 1.4.1". I am trying to retrieve the image
    from the system clipboard after it is copied from some other application. I
    am pasting the code which illustrates my requirement. It works fine on
    windows. But does not work on Mac.
    On Mac it does not cross the supported data flavor check
    (clipData.isDataFlavorSupported(DataFlavor.imageFlavor) where clipData is
    the Transferable object). It seems Mac has some InputStream instead of Image
    in the clipboard when some image is copied. I tried to read that InputStream
    using ImageIO.read(java.io.InputStream). But that is also returning null.
    Thanks
    Santanu
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import java.awt.datatransfer.*;
    import javax.swing.*;
    public class ClipboardTest extends JFrame implements KeyListener{
         JLabel label;
         static Toolkit kit = null;
         static Clipboard clipboard = null;
         public static void main (String arg[]) {
              kit = Toolkit.getDefaultToolkit();
              clipboard = kit.getSystemClipboard();
              JLabel l = new JLabel();
              JButton button = new JButton("Paste from clipboard");
              final ClipboardTest ct = new ClipboardTest(l);
              ct.getContentPane().add(l,BorderLayout.CENTER);
              ct.getContentPane().add(button,BorderLayout.SOUTH);
              ct.setVisible(true);
         button.addActionListener(
              new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        pasteImage(ct.label);
         button.addKeyListener(ct);
         public ClipboardTest (JLabel l) {
              label = l;
         public static void pasteImage(JComponent jComp) {
                   jComp.setTransferHandler(new ImageSelection());
                   TransferHandler handler = jComp.getTransferHandler();
                   Transferable clipData = clipboard.getContents(null);
              if (clipData != null) {
              if (clipData.isDataFlavorSupported(DataFlavor.imageFlavor)) {
                   handler.importData(jComp, clipData);
         //Key listener methods
         public void keyPressed(KeyEvent e) {
         int c = e.getKeyCode();
         if (c == 86) {
              if (e.isControlDown()) {
                   pasteImage(label);
         public void keyReleased(KeyEvent e) {}
         public void keyTyped(KeyEvent e) {}
    class ImageSelection extends TransferHandler implements Transferable {
         /* DataFlavor instance that holds imageflavor value*/
         private static final DataFlavor flavors[] = {DataFlavor.imageFlavor};
         private Image image;
         public boolean importData(JComponent comp, Transferable transferable) {
         try {
         if (transferable.isDataFlavorSupported(flavors[0])) {
         image = (Image)transferable.getTransferData(flavors[0]);
                   if (comp instanceof JLabel) {
                   ((JLabel)comp).setIcon(new ImageIcon(image));
                   comp.repaint();
                   return true;
         } catch (Exception ignored) {
              ignored.printStackTrace();
         return false;
         // Transferable Interface methods
         public Object getTransferData(DataFlavor flavor) {
         if (isDataFlavorSupported(flavor)) {
         return image;
         return null;
         public DataFlavor[] getTransferDataFlavors() {
         return flavors;
         public boolean isDataFlavorSupported(DataFlavor flavor) {
         return flavor.equals(flavors[0]);

    Here are two commercial options:
    JTwain + JSane
    http://asprise.com/product/jtwain/index.php
    Morena
    http://www.gnome.sk/Twain/jtp.html
    Haven't tested them, so don't no how good they are, nor how easy they are to use on multiple platforms.

  • How do I get a 300dpi image into a document as required by CreateSpace.

    I need to submit 300 dpi photos in my exported .pdf file to CreateSpace to render sharp clear images when printed on paper. This was no problem in Pages '09. But now dragging, importing, or pasting a 122.9 MB 4800 x 6400 pixel  2000 pixel per inch photo into an iPages 5.0 document yields a 77 KB, 173x231 72 pixel per inch photo in the document. This is an extreme example but all photos seem to have been downsampled to 72 pixels per inch. I understand some of the complexities of translating DPI to PPI and back but throwing away 122.823 MB of data has got to hurt rendering.  Is this a new iPages "Feature" or should I be using a different approach? I'm using Preview to check the image DPI and size.

    I created my document in pages. Dragged photos, that I had resized and resampled in Preview to make sure they were 300DPI at least, into the document.  I then export the document to .pdf using BEST image quality.
    The exported document was flagged by CreateSpace for 72DPI rather than 300DPI images. When I checked the document I found when I selected an image, copied it, and brought it up in Preview as New From Clip board, it was indeed 72DPI and much smaller than the original that I drug into the document.
    I then found that this happens immediately when it is copied from a folder and pasted into Pages. Copy a 1 MB image and paste it to both Preview and Pages.  Then go into pages, select the image, copy it, and paste it into Preview. Show inspector on the two images I've gone from 1.4MB to 300DPI .tiff file to 44KB 72DPI .png file.
    The same happens on .jpg files.

  • I want layer or shape width size copy to clipboard for re size my photo before pastit ps cs2 os xp

    i want layer or shape width size copy to clipboard for re size my photo before past into   ps cs2 os xp
    please give me solution for this [email protected]

    Using the clipboard for something like this seems wasteful (both for storing the number and for inserting an image).
    If you can elaborate on the Layer and File Structure maybe someone over at
    Photoshop Scripting
    can help you find another approach.

  • 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...

  • Writing Image in the clipboard to Oracle DB

    Hi,
    I want to write the image in the clipboard to the Blob am using JDeveloper. Can any1 help me please I am stuck on conversion and writing to Blob.
    Very Urgent Please!!!!!!!
    Comments: Applet is used to diplay an image present in the clipboard, convert this image into bytes write it to a blob and transfer the blob into Oracle DB
    package mypackage1;
    import java.applet.Applet;
    import javax.swing.JLabel;
    import oracle.jdeveloper.layout.XYLayout;
    import oracle.jdeveloper.layout.XYConstraints;
    import java.awt.datatransfer.*;
    import java.awt.image.*;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.event.*;
    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    import oracle.jdeveloper.layout.OverlayLayout2;
    import java.awt.Button;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.sql.Blob;
    import java.sql.Statement;
    import java.awt.Toolkit;
    import java.awt.event.*; //Clipboard
    import java.awt.datatransfer.*; //Clipboard
    import java.awt.Image;// .image.*; //Clipboard
    import java.sql.*;
    import java.sql.*;
    import java.net.*;
    import java.lang.*;
    import java.awt.TextField;
    import java.awt.Font;
    import oracle.sql.BLOB;
    public class ClipboardImage extends Applet
    Button displayButton = new Button();
    Button exitButton = new Button();
    JLabel photoLabel = new JLabel();
    Panel panel1 = new Panel();
    XYLayout xYLayout2 = new XYLayout();
    XYLayout xYLayout1 = new XYLayout();
    Button submitButton = new Button();
    Connection connection = null;
    static Image photo;
    public byte[] data;
    public Blob bl;
    TextField Message = new TextField();
    public ClipboardImage()
    public void init()
    try
    jbInit();
    catch(Exception e)
    e.printStackTrace();
    public static void main(String[] args)
    ClipboardImage applet = new ClipboardImage();
    Frame frame = new Frame();
    frame.addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    frame.add(applet, BorderLayout.CENTER);
    frame.setTitle("Applet Frame");
    applet.init();
    applet.start();
    frame.setSize(300, 300);
    Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = frame.getSize();
    frame.setLocation((d.width - frameSize.width) / 2, (d.height -
    frameSize.height) / 2);
    frame.setVisible(true);
    private void jbInit() throws Exception
    this.setLayout(xYLayout2);
    this.setBackground(new Color(136, 212, 122));
    displayButton.setLabel("Display");
    displayButton.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    scanButton_actionPerformed(e);
    exitButton.setLabel("Exit");
    exitButton.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    exitButton_actionPerformed(e);
    photoLabel.setText("Photo");
    panel1.setLayout(xYLayout1);
    panel1.setBackground(new Color(255, 249, 240));
    xYLayout2.setWidth(288);
    xYLayout2.setHeight(300);
    submitButton.setLabel("Submit");
    submitButton.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    submitButton_actionPerformed(e);
    Message.setFont(new Font("Abadi MT Condensed", 0, 9));
    panel1.add(photoLabel, new XYConstraints(0, 0, 115, 155));
    this.add(Message, new XYConstraints(20, 275, 250, 15));
    this.add(submitButton, new XYConstraints(105, 220, 80, 30));
    this.add(panel1, new XYConstraints(90, 25, 115, 155));
    this.add(exitButton, new XYConstraints(195, 220, 85, 30));
    this.add(displayButton, new XYConstraints(10, 220, 85, 30));
    void exitButton_actionPerformed(ActionEvent e)
    System.exit(0);
    If an image is on the system clipboard, this method returns it
    otherwise it returns null
    public static Image getClipboard()
    Transferable t =
    Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
    try
    if (t != null && t.isDataFlavorSupported(DataFlavor.imageFlavor))
    Image text = (Image)t.getTransferData(DataFlavor.imageFlavor);
    photo = text;
    return text;
    catch (UnsupportedFlavorException e)
    catch (IOException e)
    return null;
    Display an image in the system's clipboard
    void scanButton_actionPerformed(ActionEvent e)
    Image img = this.getClipboard();
    photo = img;
    photoLabel.setIcon(new ImageIcon(photo));
    // Gives out int array
    public int[] fetchPixels(Image image, int width, int height)
    int pixMap[] = new int[width*height];
    PixelGrabber pg = new PixelGrabber(image, 0,0,width,height, pixMap,
    0, width);
    try
    pg.grabPixels();
    catch (InterruptedException e)
    return null;
    if((pg.status() & ImageObserver.ABORT)!=0)
    return null;
    return pixMap;
    // Here int array given by Pixel Grabber function is converted into
    byte array
    public byte[] extractData(int[] pixmap, int numbands) {
    byte data[] = new byte[pixmap.length*numbands];
    for(int i=0;i<pixmap.length;i++){
    int pixel = pixmap;
    byte a = (byte)((pixel >> 24) & 0xff);
    byte r = (byte)((pixel >> 16) & 0xff);
    byte g = (byte)((pixel >> 8) & 0xff);
    byte b = (byte)((pixel ) & 0xff);
    if(numbands == 4){
    data[i*numbands+0] = r;
    data[i*numbands+1] = g;
    data[i*numbands+2]= b;
    data[i*numbands+3] = a;
    } else {
    data[i*numbands+0] = r;
    data[i*numbands+1] = g;
    data[i*numbands+2]= b;
    return data;
    public void processData() {
    Image awtImage = getClipboard();
    int imageWidth = awtImage.getWidth(this);
    int imageHeight = awtImage.getHeight(this);
    int[] pix = fetchPixels(awtImage, imageWidth, imageHeight);
    data = extractData(pix, 4);
    photo = awtImage;
    System.out.println(" Height = " + imageHeight + " Width = " +
    imageWidth + " Pixel = " + pix + " Byte = " + data);
    void submitButton_actionPerformed(ActionEvent e)
    processData();
    try {
    System.out.println("Executing code");
    // Load the JDBC driver
    String driverName = "oracle.jdbc.driver.OracleDriver";
    Class.forName(driverName);
    // Create a connection to the database
    String serverName = "10.20.90.101";
    String portNumber = "1521";
    String sid = "iasdb";
    String url = "jdbc:oracle:thin:@" + serverName + ":" +
    portNumber + ":" + sid;
    String username = "birmingham";
    String password = "in";
    connection = DriverManager.getConnection(url, username,
    password);
    PreparedStatement ast = connection.prepareStatement("INSERT
    INTO PASSPORT (PASSID, PHOTO) VALUES (1992, EMPTY_BLOB())");
    ast.executeUpdate();
    PreparedStatement pst = connection.prepareStatement("UPDATE
    PASSPORT SET PHOTO = ? WHERE PASSID = 1992");
    //pst.setObject(1, (Object)photo);
    //Writing bytes to blob bl
    bl.setBytes(0, data);
    //Setting the blob to transfer to the blob column in oracle
    db
    pst.setBlob(1, bl);
    pst.executeUpdate(); if(pst.EXECUTE_FAILED == 1)
    Message.setText("Sql failed!");
    }else{
    Message.setText("Sql success!");
    System.out.println ("Connected\n");
    } catch (ClassNotFoundException ea) {
    // Could not find the database driver
    } catch (SQLException ea) {
    System.out.println(ea.toString());

    Look at the ArrayListTransferHandler class in the following Drag List Demo example: http://www.java2s.com/Code/Java/Swing-JFC/DragListDemo.htm

  • Is it possible to have copy to clipboard take entries in text boxes on a fillable form as well as the form fields Windows?

    Is it possible to have copy to clipboard take entries in text boxes on a fillable form as well as the form fields in Adobe Reader Windows? When I create the forms is there some javascript or possibly a setting that would allow the end user to copy to clipboard the form fields and their entered text. Or another option that would work is to have only the entries in the text boxes copy to clipboard. Is that even possible?

    Copying fields is not possible in Reader.

  • Copy to clipboard is  Copying Global GL Account

    Hi experts ,
    whenever if we click on copy to clipboard the global gl account is getting copied to clipboard which it should not be copied as per the requirement .But I checked in Cll class of the Component .How can i manipulate that in component .or how  can i solve this
    Thanks ,
    Sandeep

    Since tap or double tap is the way copy and paste works everywhere else on the iPhone it seems very strange that in this case the copy function operates in such a different manner. I wonder how many other people miss it like me and think it must be absent because of that difference.
    No completely accurate. Tap and hold is how copy/paste/select functions work on the iPhone. A single tap does not do this. In most cases, a double tap will zoom. In a few cases, a double-tap will copy, but only when the text is isolated, i.e. in a text message box. In this same case, a tap and hold works also.
    In summary, tap and hold works in all cases I've run across.
    Message was edited by: paulcb

  • Copy to Clipboard Method (Table) copies one additional empty column more than expected

    Hi,
    I'm using the Copy to Clipboard Method for a Table, to copy for example 4 rows with 3 columns. When I paste it to Excel I get 4 rows with 3 columns and an extra column, which is empty so the real size is than 4x4.
    Is this a Labview Error or can someone explain it to me why this is happening? Or even better, how can I fix that?
    I have isolated the problem to an extra vi so you can reproduce the error. Just let the vi run once and then paste the clipboard to Microsoft Excel.
    My Labview Version is 11.0 32 Bit, Microsoft Office 2010, WinXP SP3
    Regards
    Marcel
    Solved!
    Go to Solution.
    Attachments:
    LabVIEW2011_Tablebug.vi ‏11 KB

    Snippets apparently hate property and invoke nodes.
    See attached vi for proposed workaround using the Clipboard.Write method.
    Attachments:
    LabVIEW2011_Tablebug mod.vi ‏13 KB

  • Copy To Clipboard In Safari

    Is it just me or does copy to clipboard not work in Safari? Copying from web sites is essential and pasting data into forms etc seems a convenience, yet I cannot copy. Why?

    Since tap or double tap is the way copy and paste works everywhere else on the iPhone it seems very strange that in this case the copy function operates in such a different manner. I wonder how many other people miss it like me and think it must be absent because of that difference.
    No completely accurate. Tap and hold is how copy/paste/select functions work on the iPhone. A single tap does not do this. In most cases, a double tap will zoom. In a few cases, a double-tap will copy, but only when the text is isolated, i.e. in a text message box. In this same case, a tap and hold works also.
    In summary, tap and hold works in all cases I've run across.
    Message was edited by: paulcb

  • Illustrator image copy/paste onto the Indesign the text should automatically converted into image?

    Hi All,
    Is there options to get the image copy & paste into the Indesign, if i done manually the frames and lines stroke, colors, are coming fine, but the text object only converted the image. i want to edit text  in indesign.
    this is possible for scripting or manual?
    regards
    CSM_PHIL

    You can copy/paste from Illy to ID by selecting the text with the type tool in Illy and then pasting it into ID. You will not be able to maintain the formatting. If you want to maintain the appearance the text will be converted to outlines.
    If you need to get anything other than very simple objects from Illy to ID then you should save as AI and use the file > place command to place those objects as linked graphics into ID.
    Your closing statement is irrelevant. Whether you like it or not, this is the way it is.
    Bob

Maybe you are looking for

  • How to capture an image with the camera axis

    Hi, I have an camera axis. I can receive the video. Now I try to capture an image, for example when I push the button take. I do the .vi but I confused between the different Method. SaveCurrentImageave the current Image GetImage:Gets the data corresp

  • Error while connecting to Access Database from Oracle

    Dear All, I'm trying to connect Oracle 9i to Access Database. but im getting the below error while executing query. ERROR at line 1: ORA-28545: error diagnosed by Net8 when connecting to an agent NCRO: Failed to make RSLV connection ORA-02063: preced

  • Nvidia is not working after upgrading nvidia driver and kernel

    I upgraded nvidia driver and kernel. After rebooting graphic mode is not working. Here xorg.o.log [ 281.180] This is a pre-release version of the X server from The X.Org Foundation. It is not supported in any way. Bugs may be filed in the bugzilla at

  • What are the correct answers ?

    after doing one sample swing application, i assumed the exam will be easy. when i took the exam, i couldn't do anything... what are the correct answers ??/   Which one of the following converts the Image i into the BufferedImage bi?  Choice 1   bi =

  • Is there a way to sync only the latest photo version (not master) from Aperture 3.2 to iPhone through iTunes?

    I'm interested in only having the latest version of a photo stack sync to my iPhone, currently it only syncs the master image and ignores any versions that have been created. Thank you! Sean