LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flatten two (or more) transparent PNG images (32 bit)

Solved!
Go to solution

Hello

 

How to flatten two (or more) transparent (32 bit) PNG images.

The result must be also a transparent (32 bit) PNG image.

0 Kudos
Message 1 of 8
(5,475 Views)

Hi nenvaeertz,

 

Can you be more specific? What do you mean by flatten two images?

I assume that you want to merge (or combine) two or more images into one. If yes, check the example on this link.

 

I hope that is what you were looking for.

 

Regards,

Barna D

 

0 Kudos
Message 2 of 8
(5,443 Views)

Hello

 

Yes, I want to merge (or combine) two or more images into one (the final result is transparent *.png image (32-bit).

The problem is that I do not have vision module - I cannot check suggested example.

Is possible to do this in some other way (like summing two matrix...... )?

 

Regards

Roman

0 Kudos
Message 3 of 8
(5,405 Views)

Yes you can do with the Graphics format and Picture function available in LabVIEW but am not sure that it can be done with the 32 bit... In picture function you have the flattening option... can you post the BD you made (if any) so that its better to give a more clear solution...

 

Smiley Wink

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 8
(5,399 Views)

Hello

 

Here is a part of code with the problem.

0 Kudos
Message 5 of 8
(5,389 Views)

It would be easier to use ImageMagick to do this operation.  You can call ImageMagick from LabVIEW using the DLL (call library node) or the command line (system exec VI).

0 Kudos
Message 6 of 8
(5,355 Views)

Since you aren't really doing any alpha blending and just a simple mask I would do the following.

 

 

The Picture to Pixmap VI, as you discovered, wipes out the mask, but you can restore it by simply OR-ing the two image masks.  I assume the two pictures have the same dimensions for simplicity, there are tricks if this isn't the case.

 

I have also added a Version 8 (I hope) VI since that seems to be what you are using.

Download All
0 Kudos
Message 7 of 8
(5,328 Views)
Solution
Accepted by RomanP-BSH

This is solution I was searching for.

 

Thanks Darin.K.

0 Kudos
Message 8 of 8
(5,303 Views)