Linux & IJ System clipboard

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Linux & IJ System clipboard

Gabriel Landini
Hi,
For quite some time I have been wondering why I could not use the clipboard
from IJ into another application such as Libreoffice. I always suspected that
it was a Java bug.

It turns out that that under KDE, Klipper (the clipboard) has an option
(configure Klipper) that comes as a default with an "ignore images" and "text
selection only". Doh!

De-selecting those allows copying from a ROI in IJ into a Libreoffice document
and lets you see which images have been copied too.

Maybe somebody else finds this useful (I never thought that there was a lot to
be configured for the clipboard!).

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Linux & IJ System clipboard

dscho
el,

On Mon, 29 Oct 2012, Gabriel Landini wrote:

> For quite some time I have been wondering why I could not use the
> clipboard from IJ into another application such as Libreoffice. I always
> suspected that it was a Java bug.
>
> It turns out that that under KDE, Klipper (the clipboard) has an option
> (configure Klipper) that comes as a default with an "ignore images" and
> "text selection only". Doh!
>
> De-selecting those allows copying from a ROI in IJ into a Libreoffice
> document and lets you see which images have been copied too.
>
> Maybe somebody else finds this useful (I never thought that there was a
> lot to be configured for the clipboard!).

For what it's worth, I have the same problem on Linux, and found out that
Java's clipboard handling does not offer images in .bmp format while
LibreOffice *only* accepts that format (on X11 specifically, i.e. Unix, no
less).

My common work-around is to have a GIMP instance open that can paste
images when they are offered in .png format, copy that to the system, and
then paste in LibreOffice.

Ciao,
Dscho

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Linux & IJ System clipboard

dscho
Hi Gabriel,

On Tue, 30 Oct 2012, Gabriel Landini wrote:

> On Tuesday 30 Oct 2012 18:44:42 you wrote:
> > For what it's worth, I have the same problem on Linux, and found out that
> > Java's clipboard handling does not offer images in .bmp format while
> > LibreOffice *only* accepts that format (on X11 specifically, i.e. Unix, no
> > less).
>
> Hi Sensei,

:-)

> Hmm... not sure I understand. What do you mean bmp format? In Linux,
> under IJ, I can select an open image window "Edit>Copy to System" and
> that image can then be pasted in both Writer and Impress. (Just tried
> with the Clown image and it works OK after configuring Klipper).  It
> even respects rectangular ROIs (but not the rest, it outputs the data in
> the bounding rectangle instead).

The clipboard on X11 is traditionally quite a bit broken. The problem is
that the original cut buffer really only allows for text. The clipboard
was introduced later as a kind of call-back mechanism, where you can
enquire for the clipboard contents in a certain format.

For images, the format the LibreOffice asks for *exclusively* is in bmp
format. Java only offers the images in xpm, png and jpg format, though.

GIMP is cleverer and asks for png format, but offers also in bmp format.

Hence "Copy to System" in IJ, Ctrl+Shift+V, Ctrl+A, Ctrl+C in GIMP and
Ctrl+V in LibreOffice work.

Ciao,
Dscho

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html