Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Thrash pixels on some Android phone — Gideros Forum

Thrash pixels on some Android phone

RickyngkRickyngk Member
edited August 2012 in General questions
I'm using Galaxy Gio: http://www.gsmarena.com/samsung_galaxy_gio_s5660-3741.php
And the following attachment shows exactly that is displayed on phone. There're a lot of black dots

Have you ever got the same issue before, please give me a hint !

Thanks,
bug.png 155.9K

Comments

  • moopfmoopf Guru
    edited August 2012
    That looks a lot like dithering to me. Does it look the same in the Gideros desktop player? If it does, then it's likely to be the bit depth you have saved the images in originally. If it doesn't, do you know what the bit depth of the Gio is?
  • This issue is not happened on desktop player (and some other device)

    The folowing is GIO's detail:

    TFT capacitive touchscreen, 16M colors
    Device VGA infomation:
    + Vender: Qualcomm
    + Renderer: Adreno 200
    + Version: OpelGLES 2.0

    + Pixel formats (rgba - z - stencil)
    5650 - 0 - 0
    5650 - 16 - 0
    5650 - 24 - 8
    8880 - 0 - 0
    8880 - 16 - 0
    8888 - 0 - 0
    8888 - 16 - 0
    8888 - 24 - 8
    0008 - 0 - 0
    0008 - 16 - 0
  • OK, what format are you saving the images in? My only other guess would be that however you're saving them, this is being downgraded for display by the Gio. I don't know the phone at all, so it's purely a guess.
  • RickyngkRickyngk Member
    edited August 2012
    I find-out that many phones which support only 16M color, 256K color have got this issue.
    I used 24/32bit png file. So, should I reduce to 16 bits (and how ?) ?
  • What image package are you using?
  • image package ? What do you mean ? :)
  • I mean what application are you using to create the images in the first place.
  • RickyngkRickyngk Member
    edited August 2012
    I use both ps and paint.net
  • You should be able to change it to save a 16-bit PNG in PS, try that. Not sure about paint.net
  • Thank @moopf. I'll try when back to my office in next week ;)
  • RickyngkRickyngk Member
    edited August 2012
    Finally, I've found the reason behind. I can't give exactly my code, but it works in the same way with following code:
    function GetWatermark(alpha, rgb, x, y, w, h)
    	local obj = Shape.new()
    	obj:setLineStyle(0, rgb)
    	obj:setFillStyle(Shape.SOLID, rgb, alpha)
    	obj:beginPath()
    	obj:moveTo(x, y)
    	obj:lineTo(x, y + h)
    	obj:lineTo(x + w, y + h)
    	obj:lineTo(x + w, y)
    	obj:lineTo(x, y)
    	obj:closePath()
    	obj:endPath()
    	obj:setVisible(alpha > 0)
    	return obj
    end
     
    spr = Sprite.new()
    sprChild = {Sprite.new(), Sprite.new(), Sprite.new(), Sprite.new(), Sprite.new(), Sprite.new(), Sprite.new(), Sprite.new(), Sprite.new(), Sprite.new(), Sprite.new(), Sprite.new()}
     
    for _,v in pairs(sprChild) do
    	v:addChild(GetWatermark(0, 0xFFFFFF, 0, 0, 320, 240))
    	spr:addChild(v)
    end
     
    local texture = Texture.new("logo.png")
    local bitmap = Bitmap.new(texture)
     
    sprChild[1]:addChild(bitmap)
     
    stage:addChild(spr)
    This bug is come from
    v:addChild(GetWatermark(0, 0xFFFFFF, 0, 0, 320, 240))
    @atilim: would you please explain why?

    I fixed by checking if alpha is zero, I set visible to false.

    (Note: this bug happen on Android device, which support 16M color or 256K color)

    zip
    zip
    New Project.zip
    16K
Sign In or Register to comment.