Image.pixel() always returns 255

kabexefkabexef Posts: 77

I want to set the alpha value of a pixel of one image to the value of the alpha value of a pixel of another image. Unfortunately, Image.pixel() always returns 255 for the alpha value. Since I'm working with image sections, I probably can't use the composite methods either, since they always process the entire image.

var imageTrans = new Image(100, 100, Image.Format_ARGB32);imageTrans.fill(new Color(0, 0, 0, 0));print("Alpha:", imageTrans.pixel(0, 0).alpha);imageTrans.save(sDir + "/imageTrans.png");// In the output file you can see the transparency.

Does anyone have an idea how I can achieve the desired goal?
 

Post edited by kabexef on

Comments

  • Richard HaseltineRichard Haseltine Posts: 101,482

    This is a limitation of the Qt version in DS 4 - it should go away in the next major version, I am told.

Sign In or Register to comment.