Jump to content
  • Advertisement
Sign in to follow this  
AvengerDr

[.net] Blending different sized images in GDI+?

This topic is 4762 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering if there is a more elegant method of blending two different sized images in a greater one than blending them on a per-pixel basis. Let me explain: I'm writing a sort of lens flare generator in C# so I have various images: the glow part, the "rays" part. Depending on various parameters they are not always generated to be the same size. For example the glow image could be 512x512 while the "strike" only 512x16. I tried creating a "Graphics" object based on the first bitmap and calling the drawimage method on the second but nothing seems to happen so I was wondering if it is possible to blend two images "in one go" instead of comparing each pixel. Currently I'm just aligning them so that they share the same origin (by placing the smaller one inside the greater one) and blending like that. Also, on a side note, does anyone know where I can find books and/or algorithms detailing the process of creating lens flare effects? I was basing myself on the idx3d engine for Java, but I believe there's space for improvement. Particularly algorithms on creating rays, strikes and so on. Thanks again :)

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!