How to set transparent color in images?

grgczyz

Member
Licensed User
Hello,

I would like to ask you how to set transparent color for images eg black?

My goal is to put on canvas one image and then another image (the same size at the same position). I would like to achieve that all black pixels of the second image are transparent and thanks to this in positions of black pixels of second image, pixels of first image are visible.

In basic4ppc I used -SetTransparentColor1- but it does not exist in B4A no more.

Could anyone give me code example?
Thanks in advance.

Greetings,
Greg
:sign0085:
 

grgczyz

Member
Licensed User
OK ... I managed to create a transparent image adding an extra layer to image. Thank you Erel.
I wonder if there is an easy way to transform a BMP image with black background to PNG image with transparent background?

EDIT

Ok ... I found solution for transforming not transparent backgrounds into transparent ones. You can use Ifranview and save image as png with marked option transparent. While saving the program will ask you to choose which color should be transparent. That's all.

The solution is here:
http://www.google.pl/url?sa=t&sourc...fM9qkO4_HHBlkpSzA&sig2=vNMb-jIyo6gUdfIdJhNRvg
 
Last edited:
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Coming back to this since we have come a long way since this...
So, if we have or download an image with a solid color background, is it possible to set it transparent?
Any Lib to accomplish this?
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Good to see you active on the forum again pal :D
How's life treating you these days?

Regards,
RandomCoder

As always, ups and downs... But my personal life took a huge turn, hopefully for the better, an soon after my professional life made a few adjustments too... So I now find myself doing something I love, and with time and will to code...
 
Upvote 0

RandomCoder

Well-Known Member
Licensed User
Longtime User
Very good to hear that mate, I'm very happy for you.

(Sorry for throwing this thread of topic)
;)
 
Upvote 0
Top