Not sure if its a bug or not: alpha transparancy.

Like mentioned I am not sure if this a bug or not so I will describe what is happening and if anyone can shed any light on the matter.

Example:

Create an image with any transparancy the size of a title screen ( e.g. 380 x570 , to cover device screen ) I tried 70% -  30%.

Load the image into the simulator, it will display considerably darker.

Question is why ?

The device background is black as standard isnt it ? so placing a .png with transparancy should be ok.

Hi bubblebobble,

I’m not sure I understand exactly the issue you’re facing.  You said when you load an image into the simulator with transparency, it’ll display darker.  Darker compared to what?  How it looked in your image editing software?

It might be helpful if you posted some screenshots illustrating the issue you’re facing.

  • Andrew
  1. The default color for the background is indeed black.

  2. If you render an image over it and set the alpha to say 0.7 (30% translucent), it will appear darker than the original image.

  3. Try this instead if you want the image to be lighter:

    local w = display.contentWidth local h = display.contentHeight local centerX = w/2 local centerY = h/2 local back1 = display.newRect(0,0,w,h) – white rectangle as lowest layer local back2 = display.newImageRect( “yourImage.png”, w, h) back2:translate( centerX, centerY) back2.alpha = 0.7 

Hi bubblebobble,

I’m not sure I understand exactly the issue you’re facing.  You said when you load an image into the simulator with transparency, it’ll display darker.  Darker compared to what?  How it looked in your image editing software?

It might be helpful if you posted some screenshots illustrating the issue you’re facing.

  • Andrew
  1. The default color for the background is indeed black.

  2. If you render an image over it and set the alpha to say 0.7 (30% translucent), it will appear darker than the original image.

  3. Try this instead if you want the image to be lighter:

    local w = display.contentWidth local h = display.contentHeight local centerX = w/2 local centerY = h/2 local back1 = display.newRect(0,0,w,h) – white rectangle as lowest layer local back2 = display.newImageRect( “yourImage.png”, w, h) back2:translate( centerX, centerY) back2.alpha = 0.7