Page 1 of 1

Overlay with a transparent figure in PNG data format

Posted: Thu May 08, 2025 4:47 pm
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

Re: Overlay with a transparent figure in PNG data format

Posted: Thu May 08, 2025 5:10 pm
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.

Re: Overlay with a transparent figure in PNG data format

Posted: Thu May 08, 2025 5:23 pm
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?

Re: Overlay with a transparent figure in PNG data format

Posted: Thu May 08, 2025 5:28 pm
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:

Re: Overlay with a transparent figure in PNG data format

Posted: Thu May 08, 2025 5:31 pm
by hhans
:) OK....

Re: Overlay with a transparent figure in PNG data format

Posted: Thu May 08, 2025 5:40 pm
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?

Re: Overlay with a transparent figure in PNG data format

Posted: Thu May 08, 2025 5:44 pm
by hhans
Ah good idea, I'll try later.
Thank's
Best regards Hans