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

Started by
-1 comments, last by AvengerDr 18 years, 9 months ago
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 :)
--Avengers UTD Chronicles - My game development blog

This topic is closed to new replies.

Advertisement