How can I create an image with a transparent background?

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, xnview

Elk
Posts: 143
Joined: Wed Feb 27, 2019 6:17 pm

How can I create an image with a transparent background?

Post by Elk »

How can I create an image with a transparent background?
User avatar
xnview
Author of XnView
Posts: 36411
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: How can I save an image (png) with transparent background?

Post by xnview »

the original picture has transparent background?
Pierre.
Elk
Posts: 143
Joined: Wed Feb 27, 2019 6:17 pm

Re: How can I save an image (png) with transparent background?

Post by Elk »

No no, it hasn*t.
User avatar
Rick
Posts: 200
Joined: Sat Oct 08, 2005 4:10 pm

Re: How can I save an image (png) with transparent background?

Post by Rick »

Then it needs to be edited in a photo editing software. There are some places online where you can upload and have it strip the background out
--
Rick
Elk
Posts: 143
Joined: Wed Feb 27, 2019 6:17 pm

Re: How can I save an image (png) with transparent background?

Post by Elk »

Among other things I want to use my signature to sign contracts or such on PDFs, docs, etc. Is there may be another way with using the smartphone and XnViewMP to get my signature digitized without background?
cday
XnThusiast
Posts: 3082
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How can I save an image (png) with transparent background?

Post by cday »

It can be done in XnView MP using Tools > Export...

Export.png

o Reduce the number of colours to 8 (for example).

o Set the transparency colour to the background colour, white in this case.

o Export image.

If it doesn't work first time, try again using different settings... :wink:
You do not have the required permissions to view the files attached to this post.
Elk
Posts: 143
Joined: Wed Feb 27, 2019 6:17 pm

Re: How can I save an image with a transparent background?

Post by Elk »

Ah, I have been there before but couldn't find the way.

Actually this looks good:
Image

But it is shown like this in XnVeiwMP after exporting:
Image

So obviously with white background. Or do I have to get a special view to watch that image correctly in the viewer (without background respectively a transparent one)?
User avatar
Rick
Posts: 200
Joined: Sat Oct 08, 2005 4:10 pm

Re: How can I save an image (png) with transparent background?

Post by Rick »

cday wrote: Fri Mar 05, 2021 7:54 pm It can be done in XnView MP using Tools > Export...
Well I just learned something although I will still be doing mine in Affinity Photo :mrgreen:
--
Rick
cday
XnThusiast
Posts: 3082
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How can I save an image (png) with transparent background?

Post by cday »

Rick wrote: Fri Mar 05, 2021 9:08 pm
cday wrote: Fri Mar 05, 2021 7:54 pm It can be done in XnView MP using Tools > Export...
Well I just learned something although I will still be doing mine in Affinity Photo :mrgreen:
Something useful I learned a while back from the transparency expert XnTriq but rarely use myself... :D

But XnView MP is a 'photo editing software'... :wink:
cday
XnThusiast
Posts: 3082
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How can I save an image with a transparent background?

Post by cday »

@Elk:

I updated my earlier post thinking you weren't online:

In XnView MP the reduce to 8 colours option currently doesn't produce a transparent image, bug already reported, use 16-colours.

Or use the equivalent XnView Classic function, which does work for 8 colours.
Elk
Posts: 143
Joined: Wed Feb 27, 2019 6:17 pm

Re: How can I save an image with a transparent background?

Post by Elk »

Didn't notice that, thank you.

16 colours do not work as well. Respectively the background seems to be transparent but the writing is bad:
Image

Cannot find the export option in the classic version...ah, at a different place.

This does not seem to work here:
Image

This is shown (the button shows "Speichern", means "Save" instead of "Export", is that right?):
Image

I guess, I am missing something.
cday
XnThusiast
Posts: 3082
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How can I save an image with a transparent background?

Post by cday »

Elk wrote: Fri Mar 05, 2021 9:46 pm I guess, I am missing something.
Yes: when you greatly reduce the number of colours, the appearance of an image that contains a large number of colours will be degraded... :wink:

A black and white signature might be best, or for another colour, an image with reasonably pure colours.

If necessary, you could also reduce to a larger number of colours, if the background is a nearly pure colour that you can identify when you select the colour to be transparent. If the background is a reasonably pure white, as in a scanned signature on white paper, it shouldn't be a problem.

You also need to start with an image with a reasonable number of pixels.
Elk
Posts: 143
Joined: Wed Feb 27, 2019 6:17 pm

Re: How can I save an image with a transparent background?

Post by Elk »

Whatever I choose here no transparency shown in the preview:
Image
A black and white signature might be best, or for another colour, an image with reasonably pure colours.
I would think those two colours are very pure. Blue and white (paper).

Image
cday
XnThusiast
Posts: 3082
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How can I save an image with a transparent background?

Post by cday »

In your screenshot it looks as if the right-hand preview is transparent, but with a different transparency representation.

When I tested with XnView Classic I had no problem, but it is on a Windows 10 laptop so I prefer not to use it, my output attached but transparency doesn't show on the forum.

If you need to use colour, it would probably be best to try to reduce to as many colours as is practical to work with when selecting the colour to be transparent, you can test the visual acceptability of different numbers of colours separately, if you need to.


Test_again_XnClassic.png
You do not have the required permissions to view the files attached to this post.
User avatar
Rick
Posts: 200
Joined: Sat Oct 08, 2005 4:10 pm

Re: How can I save an image (png) with transparent background?

Post by Rick »

cday wrote: Fri Mar 05, 2021 9:23 pm But XnView MP is a 'photo editing software'... :wink:
Many things that it CAN do are a bit cumbersome and much easier in Photoshop or APhoto often with a lot more controls :D
--
Rick