Overlay with a transparent figure in PNG data format

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

Moderators: helmut, XnTriq, xnview

hhans
Posts: 7
Joined: Thu May 08, 2025 4:39 pm

Overlay with a transparent figure in PNG data format

Post by hhans »

I have one figure, stored in PNG data format open in XnView. And I have another Bitmap, also in PNG data format also open in a window in XnView.
Both of these bitmaps contain an alpha channel and are in 32bit color depth. The second one is some lines on transparent background.

I tried to use this second bitmap and overlay an area in the first bitmap, using copy paste.
The result is, that the second bitmap is inserted into marked area of the first bitmap, including the transparent area around the lines.

But that is not, what I want.
I would like to have the second bitmap ontop of the first one, the lines visible, but in the transparent area the underlaying first bitmap to be visible.

Is there a way to reach this?

Best regards
Hans
cday
XnThusiast
Posts: 4368
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Overlay with a transparent figure in PNG data format

Post by cday »

A possible alternative approach which might work, I'm not sure, would be to use the 'watermark' action to place the second image onto the first: the watermark function despite its name can be used to place an image up to the size of the background image onto it.
hhans
Posts: 7
Joined: Thu May 08, 2025 4:39 pm

Re: Overlay with a transparent figure in PNG data format

Post by hhans »

This is really a working alternative approach ! Thank You for the idea.
It's a tedious, because it is not inserted into some marked area but has to be localized telling how many pixel it should be moved in each direction to find the right place.

Another question: How to display multi page bitmap files like pdf etc. with XnView and how to jump from page to page?
cday
XnThusiast
Posts: 4368
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Overlay with a transparent figure in PNG data format

Post by cday »

hhans wrote: Thu May 08, 2025 5:23 pm Another question: How to display multi page bitmap files like pdf etc. with XnView and how to jump from page to page?
Another question on a new issue, a new thread please! :wink:
hhans
Posts: 7
Joined: Thu May 08, 2025 4:39 pm

Re: Overlay with a transparent figure in PNG data format

Post by hhans »

:) OK....
cday
XnThusiast
Posts: 4368
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Overlay with a transparent figure in PNG data format

Post by cday »

Maybe
hhans wrote: Thu May 08, 2025 5:23 pm It's a tedious, because it is not inserted into some marked area but has to be localized telling how many pixel it should be moved in each direction to find the right place.
Possibly using Batch convert (which can be used for a single source image) where you can adjust the position of the watermark and also immediately see a preview of the resulting composite image?
hhans
Posts: 7
Joined: Thu May 08, 2025 4:39 pm

Re: Overlay with a transparent figure in PNG data format

Post by hhans »

Ah good idea, I'll try later.
Thank's
Best regards Hans