Something strange in android

Previous topic - Next topic

Kitty Hello

it looks like an alpha problem. Then you draw the text, can you try: ALPHAMODE -1, please?

msx

I already tried to no avail.

I am also concerned that GETSCREENSIZE not work correctly.

Kitty Hello

getscreensize has something to do with scaling of compatible apps. There's a whole thread about it and I have not quite understood the solution myself, I admit.

http://www.glbasic.com/forum/index.php?topic=6833.0

Please post a very small example that makes the error for me to test.

erico

#18
Quote from: msx on 2011-Oct-05

The images are made with photoshop and probably have several layers of transparencies. They are saved as PNG files using the "Save for Web & Devices" option.

On the other hand, the texts are not working correctly and I'm using the UO_DiNGSFont_v4 application for generating the text  with transparent background.

Do those images work when compiling for PC?
Maybe doing a small code to show those sprites on a desktop just to check?

Before saving images from photoshop where you want the alpha to work, have it single layer with the transparent area being those "chess squares". I tried using the alpha channel on the channels RGBA tab, but that one dosen´t go through the png.
Save it normally as PNG(no interlace), when you reopen your graphics on photoshop, it should show the same single layer with the chess thing.
oh, before so, you wanna select the whole screen and crop it just in case some info is outside...
It also has to be an RGB image, no CMYK, indexed colors may also no work...I guess saving for internet/devices will index the colors, but I´m not sure, go for pure RGB.

I doubt this is the problem, but hope it helps.

spacefractal

Transparenty does not work with text as well other plain draw commands (a least not on Sony Xperia Play), which could been the issue with the image?
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

msx

I managed to cause failure. Attached is a sample file with the bug.

Note that the progress bar should be red.



[attachment deleted by admin]

erico

oh, tried your test on pc,
it displays correct, checked the PNGs, they are all fine...

I guess the prob happens only on android then...
and I thought I was being helpfull somehow :x

[attachment deleted by admin]

msx

That is, only occurs in Android. In WebOS and IOS works fine.

Kitty Hello

I found a bug in loadsprite for BMP files. Can you try converting the tabla.bmp to "tabla.png" (make a real PNG file - check the file size).

BMP files crashed on my device when loading. I also fixed the transparent-colour bu for bmp files. Update soon.

msx

Thank you Gernot, you are the best.  :nw: :nw:

Kitty Hello

How can I be any good if my code has bugs? ;)

msx

because your imperfection is perfect.  :booze:

msx

I've converted "tabla.bmp" to "tabla.png" and still not working.  :S

msx

Gernot, Can you tell me why is this?

Kitty Hello

The attached binary works for me.


[attachment deleted by admin]