minor "bug": Little savebmp alpha issues

Previous topic - Next topic

spacefractal

There is some alpha issues when I trying to save a screen shots from Greedy Mouse (which use white alpha). I gonna think this picture talk for itself:


When loaded in a paint app which use black as auto alpha, then its would look like this (I used the good old Paint Shop Pro 7):


its all about some alpha issue.....

PS. Absoulutty is mightbeen just a request rather than a bug to add a optimal "noalpha" argument to the savebmp to remove it. That could fix it.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

#1
when my friend take a picture on his machine its look like this:


but when open in a paint app which use black alpha then its look completly fine (so I need to get throught a paint app first, which is what I did before annonce of this game).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kitty Hello

you must use a program that can edit the rgb and alpha channel. You must set a rgb colour for each alpha blended pixel.
You might be able to fix this with LOADSPRITEMEM and MEM2SPRITE yourself. But it's a hack.

spacefractal

yep its seen I need to look into those, but its only use on PC and MAC, but not need on mobile, so the hack like that could work.... when I done and get it to work I will post here.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

seen i could just clean up the alpha and the save the image and look as its should. For interesed for others, here is the code:

Code (glbasic) Select

FUNCTION Image_Snap: File$
GLOBAL IDSNAP=0
LOCAL Width, Height, ok, a, r, g, b
LOCAL pix%[]
GETSCREENSIZE Width, Height
IF IDSNAP=0 THEN IDSNAP=GENSPRITE()
GRABSPRITE IDSNAP, 0, 0, Width, Height
IF SPRITE2MEM(pix[], IDSNAP)
LOCAL total=BOUNDS(pix[],0)
FOR i=0 TO total-1
r = bAND(pix[i], 0xff)
g = bAND(ASR(pix[i],8), 0xff)
b = bAND(ASR(pix[i],16), 0xff)
a = bAND(ASR(pix[i],24), 0xff)
a = 255
pix[i] = bOR(RGB(r,g,b), ASL(a, 24))
NEXT
IF MEM2SPRITE(pix, IDSNAP, Width, Height)
SAVESPRITE File$, IDSNAP
ENDIF
GRABSPRITE IDSNAP, 0, 0, 8, 8
ENDIF
ENDFUNCTION
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/