hallvard / plantuml

Embed UML diagrams in files and view them in Eclipse
http://plantuml.sourceforge.net/
209 stars 57 forks source link

diagram color is altered with "copy" action #107

Closed elinjin closed 4 years ago

elinjin commented 4 years ago

hi,

I have one problem when working with the latest plugin of eclipse.

I have a very simple example with plantuml

@startuml a -> b @enduml

the diagram generated in eclipse is as usually, showing with yellow color example_with_export

but after I click the "copy" button in the Plantuml view, the picture in the clipboard is altered, as example_with_copy

it seems the R is changed to B, and B is changed to R in RGB model, the Green is still Green.

the OS I used in Windows 10 Enterprise the version of Graphivz is 2.38 the version of plantuml plugin is 1.1.24 the version of eclipse is 2020-03

not sure this problem is only applied to me or someone else has the same problem.

Hope I can get some hints from here.

Thanks for your help!

hallvard commented 4 years ago

I think I've seen this before, but I cannot remember when... it sounds like a byte sequence issue, e.g. big- or little-endian. This code hasn't been touched for a long time, so it would surprise me of it now turns out so be bad:

clipboard.setContents(new Object[]{getImage()}, new Transfer[]{ImageTransfer.getInstance()});

Perhaps you have a bad combination os 32- and 64-bit software.