Solved

How can I do transparent images?

Posted on 1998-12-19
1
202 Views
Last Modified: 2010-04-16
I want to draw my image half-transparent on the background. How is it possible?
0
Comment
Question by:mitya83
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
jack_p50 earned 0 total points
ID: 1216615
It's simple, do this thing
for each pixel of your image :
get it's color number, background's color number, then calculate such
(transparency - real 0.0 - opaque to 1.0 - full transparent)
transr:=pal[colimage].r*transparency+pal[colbackgr].r*(1-transparency)
same for transg and transb
then calculate coltodraw:=closest_rgb(transr,transg,transb)
you must do closest_rgb yourself (see color with minimal (r-rneeded)^2+(g-gneeded)^2+(b-bneeded)^2 - thats best matching color)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Make the most of your online learning experience.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question