diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/fpg_imgfmt_bmp.pas | 2 | ||||
-rw-r--r-- | src/corelib/fpg_imgfmt_png.pas | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/fpg_imgfmt_bmp.pas b/src/corelib/fpg_imgfmt_bmp.pas index f678b79b..353b3216 100644 --- a/src/corelib/fpg_imgfmt_bmp.pas +++ b/src/corelib/fpg_imgfmt_bmp.pas @@ -296,7 +296,7 @@ begin Inc(p); pdest^ := pdest^ or (longword(p^) shl 8); Inc(p); - pdest^ := pdest^ or (longword(p^) shl 16); + pdest^ := pdest^ or (longword(p^) shl 16) or ($FF shl 24) {alpha set to full opaque}; Inc(p); Inc(pdest); Inc(pixelcnt); diff --git a/src/corelib/fpg_imgfmt_png.pas b/src/corelib/fpg_imgfmt_png.pas index e4a46a7d..49f3e12c 100644 --- a/src/corelib/fpg_imgfmt_png.pas +++ b/src/corelib/fpg_imgfmt_png.pas @@ -68,7 +68,7 @@ begin for j := 0 to xlocal - 1 do begin colorA := imga.Colors[j, i]; - colorB := (colorA.Blue shr 8) or (colorA.Green and $FF00) or ((colorA.Red and $FF00) shl 8); + colorB := (colorA.Blue shr 8) or (colorA.Green and $FF00) or ((colorA.Red and $FF) shl 16) or ((colorA.Alpha and $FF) shl 24); imgb.Colors[j, i] := colorB; end; imgb.UpdateImage; |