Solved

How can I do transparent images?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with If Then Statement 8 323
Text alignment in Delphi XE3 TStringGrid when style is gdsThemed. 5 1,940
access tor through embbed delphi browser 4 387
copy one tchart to another 1 521
I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

947 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now