Mobile app version of vmapp.org
Login or Join
Dunderdale640

: Is there a conventional format for an alpha mask? I'm a programmer, not a graphic designer. I'm writing a custom View for Android that requires the ability to apply an alpha mask to an image.

@Dunderdale640

Posted in: #AdobePhotoshop #InterfaceDesign #Transparency

I'm a programmer, not a graphic designer. I'm writing a custom View for Android that requires the ability to apply an alpha mask to an image. I want to make it easy for graphic designers (specifically, those who specialize in UI widgets like buttons and icons) to produce media for this software.

Is there any standard or conventional file format for an alpha mask? In other words, if I were to ask a UI designer to give me an alpha mask, what would it look like? The most common example I find on the web is a bitmap with black indicating complete transparency and white indicating complete opacity. Is that a format that graphic designers would be familiar with?

If the answer differs by application, I'm most interested in what would be familiar to a designer using Photoshop.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Dunderdale640

2 Comments

Sorted by latest first Latest Oldest Best

 

@Si6392903

An alpha mask is just a grayscale image. Yes you have the black and the white, but the interesting part is that you can have any grey to have any level of transparency.

There are some specific points on using a png file, for example small file size and it does not generate compression artifacts like a jpg file. You could also use a tif format or a psd file... But a simple png file will do.

In the case you need transparencies for a logo, yo need to use a losless file. but actually, it can be fun to use any image or photo (from a cell phone for example), that most likley will be full color and a 24 bit compressed jpg.

It would be nice if the aplication informs that the mask:

1) Is not the same size or proportion of the target image, but in general terms you can just strech it to fit it.

2) Is a color image, and it will be converted into grayscale.

3) A warning that a png file with transparencies can not be used. That transparency will be discarded and unpredictable results may occur. (If you put a mask you can just hide the background. If you remove this mask you can either just make it white, or black or reveal the original background)

4) Is a compressed jpg and some artifacts can occur.

5) If an 8 bit file is being used inform that it probably contain dithered patterns.

In general. A png or jpg file would be great.

10% popularity Vote Up Vote Down


 

@Caterina889

For universal use and since the mask is all about transparency, a standard greyscale PNG32 image would be one of the best formats to work properly.

You could use PNG8 if the mask doesn't need to be "soft" in any areas.

Beyond this, one gets into application-specific formats.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme