<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div><div><div><div><div><div><div><div>Dear all,<br><br></div>I build some masks with scilab, that I want to apply later on a set of images.<br></div><div>I can build these masks a batch process, because I have pixel coordinates that define the mask coordinates.<br></div><div></div>Each mask itself will be an image....<br>For now I use xs2svg and/or xs2png<br><br></div>Now: Is there a way to export images from scilab applying alpha channel?<br><br></div>I ask, because several masks will be layered on top of each other...together with a mask that is build manually by a user.<br></div>To get the final result I - for now - have to make each (mask-) image a bit transparent, to still see the underlaying image.<br></div>Thus I loose the original color of the mask image.<br><br></div>I could probably build an R-G-B-alpha image such as:<br><br></div>img = zeros[imgHeight, imgWidht ,4];<br><br></div>R = img[ : , : ,1];<br>G = img[ : , : ,2];<br>B = img[ : , : ,3];<br>A = img[ : , : ,4];<div><div><div><div><div><br></div><div>and than set the right pixel values at the right positions.<br><br></div><div>However: It seems, that it is not possible to add the alpha channel to an image when exporting it to a native image file..such as png.<br><br></div><div>imwrite (IPCV-toolbox) seems to support only 8bit (one-channel) or 24bit (3-channel) image.<br><br></div><div>Many thanks,<br></div><div>Philipp<br></div><div><br></div></div></div></div></div></div></div></div></div></div>