Jump to content
WnSoft Forums

Colored Masks


Artem

Recommended Posts

Colored Masks

Since version 7.0, it is possible to use colored masks in PicturesToExe. A quote from What’s New of version 7.0: “Mask object can use color 32-bit PNG image file with alpha channel for special visual effects”.

Perhaps not all PicturesToExe users quite understand what exactly this means. Here’s a little illustration:

This is PicturesToExe project opened in version 6.5

post-11636-0-75569700-1342446739_thumb.j

This is the same project opened in version 7.0

post-11636-0-08754900-1342446794_thumb.j

Here’s the original file of mask, for comparison:

post-11636-0-76275900-1342446819_thumb.j

Source project + Exe: http://wnsoft.com/files/test/color_masks.zip

Since version 7.0 you can use almost any image file (BMP, JPG, PNG) as mask: 32bit or 24bit, black and white or colored one. The only exception are GIF files – using them as mask can lead to visual defects.

If versions 6.5 and older, however, there was a limitation: if you use a colored image file as mask, only alpha-channel of it will be used; while r,g and b channels were ignored. This is no longer the case in version 7.0.

Note: as far as I know, most PicturesToExe users (of those who use masks) have black-and-white images for masks; pre-built masks (Rectangular and Circular) which you can create right in PicturesToExe, are also black-and-white. Algorithm regarding those black-and-white masks has not changed. Changes only affect colored masks, i.e. there r,g and b channels are not equal.

If you have any questions about masks, feel free to ask.

Link to comment
Share on other sites

Wouldn't it be fine to have several options? Examples:

  • The situation as given today: Each color channel of the mask image acts as mask (alpha channel) for the corresponding color channel of the image in the mask container.
  • A grey-scale version of the colored mask image should act as mask.
  • A particular color channel ( R, G, or B ) of the mask image should act as mask
  • The alpha channel of the mask image (if there is one) should act as mask

Regards,

Xaver

Link to comment
Share on other sites

Xaver,

I don't think these options are really needed. You can create any image file in editors such as Photoshop, and use them as mask.

For alpha-channel mask, use black-and-white image. It will be converted inside PTE automatically (white to transparent, black to opaque).

I am not sure what you mean by "R channel acting as mask". What only R channel will determine the degree of transparency (R=255 - transparent, R=0 - opaque)?

Wouldn't it be the same as alpha-channel mask?

For grayscale mask, that's a bit tricky. If you use grayscale image file as mask (R, G and B channels equal in every pixel), it will be converted into alpha-channel mask. To avoid this, make these channels unequal at least in one pixel.

Link to comment
Share on other sites

Artem,

You can do a lot in Photoshop, but that isn't the point. It seems to me that you did not understand my post.

Consider a 24-bit image, having 3 color channels (R=red, G=green, B=blue). Of course, you may use Photoshop to extract and export, say, the image's red channel as a B/W-image (B/W = black and white). Now you can apply this red channel as a mask in PTE. As far as I am informed, when using Wings Platinum, you can apply an arbitrary RGB-image (R=red, G=green, B=blue) as a mask object (for some other objects), and you have a choice which of its three channels is responsible for the control of transparency (of these other objects). Yes, you can go via Photshop, but here I would prefer the way of WP (Wings Platinum). A similar choice could be offered for 32-bit images regarding the fourth channel (so-called alpha channel).

Regards,

Xaver

Link to comment
Share on other sites

Xaver,

I see your point now. Thanks for the idea.

Programming it would be rather easy, technically.

But I have one concern. Mask is already fairly complicated feature, even advanced users of PicturesToExe might not fully understand all its aspects. This is the reason I started this topic, to explain how masks work. Wouldn't adding more options confuse users? Are these options absolutely necessary?

If more people request such options for mask, I will add your idea to my TODO list.

Link to comment
Share on other sites

Artem,

Do you think that most of the users are in the position to understand your example? I don't know. At present time, I do not see a big advantage in the new algorithm used in v7, and there are situations where the old method seems to be the better one. All in all, I do not regard all this as a serious problem. And, I really can live without seeing my suggestion to be implemented :)

Regards,

Xaver

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...