Solved

How can I do transparent images?

Posted on 1998-12-19
1
198 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

The goal of this blog is: - To define the incident management process - To go over the key elements of an incident management system - To look into incident alert management tools that integrate with ConnectWise.
Check out this step-by-step guide for asking an anonymous question on Experts Exchange.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

742 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