Page 1 of 3

How can I create an image with a transparent background?

Posted: Fri Mar 05, 2021 9:31 am
by Elk
How can I create an image with a transparent background?

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

Posted: Fri Mar 05, 2021 3:55 pm
by xnview
the original picture has transparent background?

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

Posted: Fri Mar 05, 2021 6:13 pm
by Elk
No no, it hasn*t.

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

Posted: Fri Mar 05, 2021 6:31 pm
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

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

Posted: Fri Mar 05, 2021 7:02 pm
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?

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

Posted: Fri Mar 05, 2021 7:54 pm
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:

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

Posted: Fri Mar 05, 2021 9:04 pm
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)?

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

Posted: Fri Mar 05, 2021 9:08 pm
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:

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

Posted: Fri Mar 05, 2021 9:23 pm
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:

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

Posted: Fri Mar 05, 2021 9:32 pm
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.

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

Posted: Fri Mar 05, 2021 9:46 pm
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.

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

Posted: Fri Mar 05, 2021 9:59 pm
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.

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

Posted: Fri Mar 05, 2021 10:21 pm
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

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

Posted: Fri Mar 05, 2021 10:37 pm
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
Test_again_XnClassic.png (446 Bytes) Viewed 7664 times

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

Posted: Fri Mar 05, 2021 10:38 pm
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