Joined: Apr 25, 2006 Posts: 2315 Location: Montpellier, France
Posted: 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.
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?
...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.
Joined: Apr 25, 2006 Posts: 2315 Location: Montpellier, France
Posted: 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?
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.
Joined: Apr 25, 2006 Posts: 2315 Location: Montpellier, France
Posted: 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.
All times are GMT - 7 Hours Goto page Previous1, 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