Questions tagged [alphablending]

Alpha blending is a convex combination of a translucent foreground color with a background color allowing for transparency effects.

562 questions
0
votes
0 answers

Using 32bit Bitmap for Toobar?

We do use a Toolbar that is created with the Win32 CreateToolbarEx() function. Currently it uses a 24bit Bitmap for displaying the Buttons. Is there any possibility to use a 32bit Bitmap with Alpha blending for better displaying the Background of…
0
votes
2 answers

ActionScript 3 - Draw two shapes on the same movie clip's graphics avoiding alpha blending between them

for example: var mc:MovieClip=new MovieClip(); mc.graphics.beginFill(0x000000,0.5); mc.graphics.drawRect(0,0,100,100); mc.graphics.endFill(); mc.graphics.beginFill(0x000000,0.5); mc.graphics.drawRect(0,0,100,100); mc.graphics.endFill(); with this…
s-kira
  • 7
  • 2
  • 3
0
votes
0 answers

Using Graphics to Draw a BufferedImage with AlphaBlending Java

I do a lot of game programming in my free time, and am currently working on a game engine library. Previous to this point I have made customized per game engines built straight into the application, however, to challenge my logical skills even…
CraigR8806
  • 1,584
  • 13
  • 21
0
votes
0 answers

Perfecting "Bitmap.MakeTransparent()" method for Alpha Blending

I was using the famous Microsoft's "Windows API Code Pack" examples to extract Shell thumbnails from files. The examples returns a bitmap of the thumbnail, and the problem is when the method returns a big Icon or dynamically generated folder…
TMS
  • 129
  • 7
0
votes
0 answers

PHP Png is has a black background after resize

when I trying to resize an PNG with function resize($width,$height){ $new_image = imagecreatetruecolor($width, $height); if($this->image_type == IMAGETYPE_PNG || $this->type == 'image/png') { imagealphablending($new_image,…
0
votes
1 answer

Understanding AlphaBlending in Windows

I have a 32bpp bitmap image which has an alpha channel with values ranging from 0-255. I am trying to display this in a window using win32 APIs (snippet of code I am using to display is appended). I was reading the documentation and it turns out…
TheBlueNotebook
  • 1,204
  • 3
  • 15
  • 35
0
votes
0 answers

Alpha Transparency Layering XNA

I'm currently having some problems with alpha transparency in XNA and for anybody who has experience with the framework I'd appreciate some help. The code is below but in this code example note that: ReadStencil = new DepthStencilState() …
0
votes
1 answer

Opengl front to back blending issue (black screen)

I'm implementing a renderer where the shading requires front-to-back rendering. I'm having issues figuring out how to initialize the blending function. Here's what I tried. glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LESS);…
Jens
  • 113
  • 1
  • 10
0
votes
2 answers

Alpha blending clarification

I am implementing an alpha blending, and one of the examples I came across used this format. I am confused why the division by 256 and why isn't there inv_alpha in red and blue channels int pixel,vga_pixel; int alpha, blue, green, red, pixel; int…
0
votes
0 answers

I can't change Alpha property of a HUD in AndEngine. Is it possible?

I'm trying to change alpha value of a HUD, but it is not changing. I've tried with AlphaModifier and changing with method .setAlpha(), but with no result. As i can see, a HUD entity does not have setBlendingFunction() method. This is what i am now…
GmloMalo
  • 667
  • 7
  • 14
0
votes
2 answers

Intersection Region Color

i have drawn two semitransparent circles which intersect each other. I have found that the intersection region is deeper in color than other regions. is there any way to make the whole shape as one semitransparent color (color shouldn't be deeper in…
Khasan
  • 1
0
votes
0 answers

Cocos2d-x 3.x rendering with and without spritesheet

I am rendering a flower from textures from a spritesheet on screen, and all looks fine. When I use the same textures but not from a spritesheet the flower is rendered differently. This image (first, below) of the flower rendered from a spritesheet…
andrewz
  • 4,729
  • 5
  • 49
  • 67
0
votes
2 answers

Merge two images(Byte array format) to a single image with alpha

How to merge two byte array images using alpha mask to a image. I want to add an image on top of other image with alpha using byte operations. How to achieve this for byte array images?
Pavandroid
  • 1,586
  • 2
  • 15
  • 30
0
votes
1 answer

What blend mode do I want so that two 0.2 alphas add up to a 0.4 alpha on a pixel?

Pretty basic: If I draw two polygons (lines in appearance, but they're triangulated quads for the lines) with 0.2f in the Alpha, I'd like them to be brighter where they overlap. Currently, no matter what blending op I've tried, the results vary but…
Dave
  • 1,521
  • 17
  • 31
0
votes
2 answers

Alpha blending using table lookup is not as fast as expected

I thought memory access would be faster than the multiplication and division (although compiler-optimized) done with alpha blending. But it wasn't as fast as expected. The 16 megabytes used for the table is not an issue in this case. But it is a…
user3810155