Exporting image from Draw with transparent background

Discuss the drawing application

Exporting image from Draw with transparent background

Postby cadu » Sat Jan 07, 2012 2:22 pm

Hello,
I exported image from Draw to PNG format (which supports transparency).
I couldn't find any options in Draw to export with transparency (without the white background).
When I tried to use the images, they were with the background unfortunately. And I need to insert the image over other image (like a montage) and transparency is fundamental.
May anyone tell me whether Draw is able to export image with transparency? How to do it?
Thanks in advance,
Cadu
OpenOffice 3.3 on Windows 7
cadu
 
Posts: 15
Joined: Wed Jan 04, 2012 11:13 pm

Re: Exporting image from Draw with transparent background

Postby acknak » Sat Jan 07, 2012 6:53 pm

Sorry, it's not possible. I don't know of any workaround for it. You always get the page background behind exported images.

If you want to work in a vector drawing application but export the result as an image, you should use Inkscape (http://www.inkscape.org): it's far more capable and has first-class image export.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Exporting image from Draw with transparent background

Postby cadu » Sun Jan 08, 2012 3:39 am

Hello,
If "PNG with transparency" was possible a plenty of image usage could be attached to draw...
Following your tip I am exporting from Draw as WMF or SVG and finishing the work in Inkscape. What a pity! Otherwise Draw would be sufficient to my needs.
Do you know when Draw apply 3d-look to charts the shapes become raster instead vector? It is because I could ungroup in Inkscape or even "break" in Draw just the plan charts...
Ps.: Is there any way of suggest it to team developers? I think this is a little feature that could improve a lot images outputs of Draw. I was hoping a little bit more of Draw on it. It seems to me that is impossible inside OOo suite to create a simple logo with transparency to apply in documents with colorful background...
Best,
Cadu
OpenOffice 3.3 on Windows 7
cadu
 
Posts: 15
Joined: Wed Jan 04, 2012 11:13 pm

Re: Exporting image from Draw with transparent background

Postby acknak » Sun Jan 08, 2012 5:20 am

See [Tutorial] Reporting bugs or suggestions

However, I'm almost certain that this has already been brought up. As you say, it's a rather critical limitation.

It seems to me that is impossible inside OOo suite to create a simple logo with transparency to apply in documents with colorful background.

Yes, you are correct; that is not possible with OOo.

However, it is also not needed: you can create the logo as a vector graphic and copy/paste that without any background. There's no need to convert the vector logo to an image if you're going to use it in an OOo document.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Exporting image from Draw with transparent background

Postby cadu » Sun Jan 08, 2012 5:35 pm

Thanks for your attention Acknak!!!
OpenOffice 3.3 on Windows 7
cadu
 
Posts: 15
Joined: Wed Jan 04, 2012 11:13 pm

Re: Exporting image from Draw with transparent background

Postby keme » Fri Jan 13, 2012 12:04 pm

There is a workaround for making the png background transparent:
  • Select your object(s) and export to png (tick "selection"!) as you normally would.
  • Insert the exported image into Draw.
  • Use the eyedropper to make the image background transparent. (If you have white areas that should not be transparent, you need to use some "greenscreen" colour for the background of your original drawing)
  • Save as image.
Alas, it seems that Draw won't keep transparency when exporting objects, so there's no way to maintain partial transparency on your drawing objects, even though the png format itself supports an "alpha channel" which should allow this.
Apache OO 3.4.1/4.1.2/4.1.3, on Ms Windows 7/10 and Mac OS-X 10.8.5 and 10.11.
LibreOffice 4.3.3.2 on Mepis Antix MX 14
User avatar
keme
Volunteer
 
Posts: 3343
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Exporting image from Draw with transparent background

Postby acknak » Fri Jan 13, 2012 4:50 pm

Nice!

Yes, that's the only workaround I'm aware of, and depending on the graphic, it may work well.

But if you're starting out to make such an image, it's better not to use Draw at all. There are a number of issues with using Draw for this, and for some (maybe most) cases, the workaround will still leave discolored edges due to antialiasing. You have to use the alpha channel to get it right.

Inkscape gives a really nice result for this sort of work.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Exporting image from Draw with transparent background

Postby alg » Sat May 26, 2012 4:18 pm

For AOO 3.4 I have extended the conversion to bitmap to create no longer the white background but the needed alpha channel (also improved quality in the current trunk, unfortunately not in the release version). I have no 3.4 at hand right now, but since that conversion is the base for exporting selected graphics to pixel formats (as png) you may try to export to png in AOO 3.4, it may be possible now. I'll check ASAP, too. HTH!
OpenOffice 3.3/3.4 on various systems
alg
 
Posts: 53
Joined: Tue Apr 03, 2012 5:02 pm

Re: Exporting image from Draw with transparent background

Postby acknak » Sat May 26, 2012 9:43 pm

Great news! That will be a really nice improvement. Thanks!

For me, AOO 3.4 still exports a white background with the selected object; I'll keep looking for it in newer releases.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Exporting image from Draw with transparent background

Postby alg » Sun May 27, 2012 1:13 pm

Hi acknak, thanks for checking. At least the conversion to bitmap should be better now (in 3.4). Do we have a task on bugzilla for this that I can set to something more current and to keep an eye on it?
OpenOffice 3.3/3.4 on various systems
alg
 
Posts: 53
Joined: Tue Apr 03, 2012 5:02 pm

Re: Exporting image from Draw with transparent background

Postby alg » Wed May 30, 2012 1:19 pm

Hi acknak,

just checked wit an AOO3.4. Exporting directly (e.g. ellipse) does not yet create transparencies, but as a workaround every object can now be first converted to bitmap (context menu) and when exporting this (to a format supporting transparencies, e.g. png) you get the transparent graphic in good quality.

I will check where the conversion happens internally for direct export to automate his AFAP...
HTH for the moment!
OpenOffice 3.3/3.4 on various systems
alg
 
Posts: 53
Joined: Tue Apr 03, 2012 5:02 pm

Re: Exporting image from Draw with transparent background

Postby acknak » Wed May 30, 2012 3:28 pm

Sounds like a good workaround. I noticed the Convert > To bitmap function but I failed to make the connection.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Exporting image from Draw with transparent background

Postby alg » Wed May 30, 2012 5:16 pm

Hi acknak,

I have checked the code. It is possible with AOO3.4 to export the selection as GIF (without converting to bitmap before). In the GIF feature dialog transparency is available and works. Disadvantage is that in GIF only a mask (1bit) is possible, thus gradient transparencies of objects will get lost and the edges will not be too nice anti-aliased.

Despite that the quality can be improved and a transparency feature is obviously missing in PNG export and it's feature dialog. I wrote #119601# for it and already found the relevant places. Thus, the next major release will allow export without the trick to first convert to bitmap via context menu.

HTH!
OpenOffice 3.3/3.4 on various systems
alg
 
Posts: 53
Joined: Tue Apr 03, 2012 5:02 pm

Re: Exporting image from Draw with transparent background

Postby acknak » Wed May 30, 2012 8:27 pm

Good write-up--thanks!
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Exporting image from Draw with transparent background

Postby emiliano1954 » Fri Aug 12, 2016 12:37 pm

I found a workaround to have transparent background from LibreOffice Draw.
1. Export a PNG image with white background as usual.
2. Load the image into lunapic.com
3. Edit > Transparent.
4. Click on a white area.
5. Save the image with transparent background.

Is simple and useful for me.
OpenOffice 2.4 on Ubuntu 9.04
emiliano1954
 
Posts: 1
Joined: Fri Aug 12, 2016 12:29 pm


Return to Draw

Who is online

Users browsing this forum: Google [Bot] and 0 guests