Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - transparency from clipboard
transparency from clipboard
 
   NeoOffice Forum Index -> NeoOffice Beta Releases
View previous topic :: View next topic  
Author Message
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Tue Jun 02, 2009 3:05 pm    Post subject:

pluby wrote:
Samwise wrote:
With the new patch, the problem has changed but isn't fixed. Now the image has a white background, not transparent.

To reproduce, set the background color of you document to red, for example, and drag the image from the Finder (transparent parts are red and change if you switch the bg color) vs. from the Media Browser (transparent parts are white no matter what the bg color is).


I have bad news: my original fix for pasting transparent images never worked. Like you found, my fix only changed the transparent pixels from being black to white.

After spending a full day on this, I found the cause of the problem and it is that the OpenOffice.org code will always convert any pasted images into a 24 bit opaque image. Even worse, when I disabled this conversion, scrolling the document caused all sorts of stray artifacts as the OpenOffice.org code does not expect pasted images to be transparent. Sad

Patrick


I'm not sure I completely understand this: while the background becomes white when I drag the image from the Media Browser, it behaves as expected (bg is transparent and adapts to the documents bg color when it is changed) when dragging from the Finder. Do you mean the "drag from Finder" will work, but dragging from the Media Browser will never work?
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Jun 02, 2009 3:19 pm    Post subject:

Samwise wrote:
...Do you mean the "drag from Finder" will work, but dragging from the Media Browser will never work?


Yes. That is what I mean. Pasting an image or dragging from within NeoOffice or most other applications uses one piece of the OpenOffice.org code and that code is what converts the image to an opaque image.

In contrast, dragging from the Finder sends a file path which, in turn, triggers the OpenOffice.org code that supports the Insert :: Picture :: From File menu which is a different piece of code.

Patrick
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Tue Jun 02, 2009 3:32 pm    Post subject:

pluby wrote:
Samwise wrote:
...Do you mean the "drag from Finder" will work, but dragging from the Media Browser will never work?


Yes. That is what I mean. Pasting an image or dragging from within NeoOffice or most other applications uses one piece of the OpenOffice.org code and that code is what converts the image to an opaque image.

In contrast, dragging from the Finder sends a file path which, in turn, triggers the OpenOffice.org code that supports the Insert :: Picture :: From File menu which is a different piece of code.

Patrick


OK. And I guess hacking OOo into using Insert > Picture > From File when dragging from the Media Browser would be tedious and/or difficult?
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Jun 02, 2009 3:43 pm    Post subject:

Samwise wrote:
OK. And I guess hacking OOo into using Insert > Picture > From File when dragging from the Media Browser would be tedious and/or difficult?


I already spent now nearly two full days of work on this and I have not found a solution. This is not a Media Browser issue. It is an OpenOffice.org issue in handling dragged or pasted images so large chunks of OpenOffice.org's image pasting code would probably need to be rewritten and I am still not sure where are those pieces are.

Patrick
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Tue Jun 02, 2009 4:46 pm    Post subject:

pluby wrote:
Samwise wrote:
OK. And I guess hacking OOo into using Insert > Picture > From File when dragging from the Media Browser would be tedious and/or difficult?


I already spent now nearly two full days of work on this and I have not found a solution. This is not a Media Browser issue. It is an OpenOffice.org issue in handling dragged or pasted images so large chunks of OpenOffice.org's image pasting code would probably need to be rewritten and I am still not sure where are those pieces are.

Patrick


OK.
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Beta Releases All times are GMT - 7 Hours
Goto page Previous  1, 2
Page 2 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.