Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8538277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:05:56+00:00 2026-06-11T11:05:56+00:00

I have two layers of bitmaps: 1st – some random image 2nd – bitmap

  • 0

I have two layers of bitmaps:
1st – some random image
2nd – bitmap filled with black color that covers 1st bitmap
Also I have a mask bitmap.
I trying to make something like this
https://dl.dropbox.com/u/13089585/so/001.jpg
But I get something like this:
https://dl.dropbox.com/u/13089585/so/002.jpg
I tryed to do this using BitmapData::copyPixels, BitmapData::copyChannel and BitmapData::draw with different combinations of parameters, but still can not make it… I need some method that will override alpha value on dest. bitmap, but only if this value is greater then in src. bitmap.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T11:05:57+00:00Added an answer on June 11, 2026 at 11:05 am

    first off, if you use a sprite instead of a bitmap as a mask, you can use BitmapData.draw() with BlendMode.ERASE to get that effect. but that will not work if you want translucency (e.g. 50% alpha).

    what you can do is have the mask bitmap be black where you want the 2nd image to be transparent and and transparent elsewhere (30% alpha in the mask will become 70% alpha on 2nd bitmap).
    now, create a 3rd BitmapData with fill color red, draw the mask onto 3rd BitmapData using BlendMode.DARKEN.
    then, use copyChannel() from 3rd red to 2nd alpha.

    it’s not pretty, but real life never is…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two bitmaps that differ only by color. The green one is used
I have a window that has two layers: a static background and a foreground
I have two Fusion Tables that are added as layers to a map visualization.
I have two layers. The first layer is Image control. The source of it
i have created two color layers and displayed them on the screen: if( (self=[super
I have a JLayeredPane that has two layers. The top level is fully transparent
In the code below I have two Canvas layers one text and one image,
Suppose you have an application that consists of two layers: A: A data layer
I have two layers being drawn. A static background texture and a texture(png) with
I have two projects, both of them data access layers, and both using EF.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.