I am studying the alpha blending by using the LWJGL.
My test program blends the image01(Dst) and image02(Src).
And I try some patterns (the combo of the image file format).
But there are the good case (image03), and the bad case (image04).
I want to clear up this, I post this question.
--------
Case1 Dst image:bmp file
Src image:bmp file
<result>
Test program moved as planned.
Case2 Dst image:bmp file
Src image:png file without alpha parameter.
<result>
Test program moved as planned.
Case3 Dst image:bmp file
Src image:png file with alpha parameter (aPNG file).
<result>
Test program did not move as planned.
The result image was the blending image surely, but it lost the color of the src image.
<detail>
The png image file shown above was converted from the bmp file by free tool.
My program loads the texture as shown below, and tells whether the image has the alpha parameter or not.
[Source01]
textureSrc = TextureLoader.getTexture("PNG", new FileInputStream("res/font_withAlpha.png"));
System.out.println(" Image Alpha : "+texture.hasAlpha());
I confirmed that the image has the alpha value by reading the console text shown below.
" Image Alpha : true" [Console01]
My Question Why the result image lost the color in Case3?
I think four points.
1.Might I miss-set the first parameter? (the source is shown in Source01.)
Are the parameter good?
2.Might the aPNG be file bad-converted?
But, texture.hasAlpha() returns "true".
And I confirmed that the aPNG file had the color by using the viewer "IrfanView".
I want to use the another valid aPNG file.
Do you know the download site that supplies the sample aPNG file?
If you know, please tell me.
3.Might my program have the bags in another line?
I don't want to distrust this because case1 and case2 moved as planed.
4.Might the function "getTexture" not correspond to the aPNG?
I don't want to distrust this......