dcsimg
cut and pasting jpeg/bmp images using java.awt.datatransfer
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ben_montello
Posted On:   Wednesday, April 25, 2001 12:20 PM

I am trying to use the java.awt.datatransfer package to cut and paste JPEG or DIB(BMP) formatted images to the windows system clipboard. I have an image encoder that enables me to get the JPEG, DIB image as a byte[] and I set up my data flavor as type "image/jpeg" or "image/bmp". When I use the setContents() it appears to copy something over to the clipboard. In the clipboard viewer though, it says something is there but can't be displayed. When you open word or wordpad, you do not have the option to paste even though something is on the clipboard... Is this related to the bug listed: http://developer.java.sun.com/developer/bugParade/bugs/4040183.html I know that you there are problems cutting and pasting Java I   More>>

I am trying to use the java.awt.datatransfer package to cut and paste JPEG or DIB(BMP) formatted images to the windows system clipboard. I have an image encoder that enables me to get the JPEG, DIB image as a byte[] and I set up my data flavor as type "image/jpeg" or "image/bmp". When I use the setContents() it appears to copy something over to the clipboard. In the clipboard viewer though, it says something is there but can't be displayed. When you open word or wordpad, you do not have the option to paste even though something is on the clipboard...

Is this related to the bug listed:
http://developer.java.sun.com/developer/bugParade/bugs/4040183.html

I know that you there are problems cutting and pasting Java Images (java.awt.image) but if I can encode it as a windows supported type image/bmp or image/jpeg, I would think that it should work...

Should I beable to cut and paste a bmp, or jpeg to the windows system clipboard?or is this still a bug waiting to be fixed?

thanks.

   <<Less

Re: cut and pasting jpeg/bmp images using java.awt.datatransfer

Posted By:   Jens_Karstedt  
Posted On:   Friday, May 18, 2001 07:12 AM

Hi.. all my tests with Clipboard
Contets returned null
excepted a simple text...
tried this with 1.2 and 1.3
All my reseaches showed me that no one is really able to say what is possible and what not.
This is a point really to look out for another programming language !
Some idiots told about things like moving Images (DIB) from and to java and MS- Applications.. but no one never answered to any requests i did...
Even the sun pages woudn´t give You an answer to that question...
I'm fed up with the clipboard, but if
You or someon else is able to show me a demo that cuts and pastes DIB-stuff to MS I will change my mind...
Good luck to your researches...
Jens
About | Sitemap | Contact