Solved

How can I do transparent images?

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
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.

744 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

11 Experts available now in Live!

Get 1:1 Help Now