09-16-2010 12:56 AM
Hello
How to flatten two (or more) transparent (32 bit) PNG images.
The result must be also a transparent (32 bit) PNG image.
Solved! Go to Solution.
09-17-2010 06:14 AM
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
09-20-2010 01:26 AM
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
09-20-2010 01:35 AM
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...
09-20-2010 03:51 AM
Hello
Here is a part of code with the problem.
09-20-2010 08:09 AM
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).
09-20-2010 03:02 PM - edited 09-20-2010 03:10 PM
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.
09-21-2010 01:31 AM
This is solution I was searching for.
Thanks Darin.K.