9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: andrey mirtchovski <mirtchov@cpsc.ucalgary.ca>
To: 9fans@cse.psu.edu
Subject: [9fans] color compositing
Date: Tue, 14 Sep 2004 17:52:10 -0600	[thread overview]
Message-ID: <564b487b1feec76d33fa694aabe072ad@plan9.ucalgary.ca> (raw)

i'm in a pickle here trying to find out how to use duff/porter's alpha
channels properly.  here's the situation:

	- there is an image with background color which should be
	transparent

	- this image, sans the background color, should go onto
	another image

the problem is that i'm not able to extract the non-background color
from the image.  obviously the easiest soution would be to use a mask
for anything that non-background, so the first thing i tried was to
use the image as a mask on a 'draw everything in white on black
background'.  the problem i ran into was that if i use a low-bit
channel (GRAY1) i only see the parts of the image which were bright
enough originally, if i use a higher-bit channel i get variations of
grey causing everything drawn afterwards to appear black'n'white...

then i tried several of the duff/porter compositing operators with
absolutely no effect whatsoever.

in my desperation i even tried creating an image with the alpha for
the particular color set to zero, but it proved fruitless.

to summarize: how can i remove a certain color from an image
programmatically?

andrey



             reply	other threads:[~2004-09-14 23:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-14 23:52 andrey mirtchovski [this message]
2004-09-15  1:19 ` Russ Cox
2004-09-15  1:24   ` andrey mirtchovski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=564b487b1feec76d33fa694aabe072ad@plan9.ucalgary.ca \
    --to=mirtchov@cpsc.ucalgary.ca \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).