[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #1271: Imlib2 image-create initializes w/ garbage
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #1271: Imlib2 image-create initializes w/ garbage |
Date: |
Sun, 20 Mar 2016 07:50:30 -0000 |
#1271: Imlib2 image-create initializes w/ garbage
------------------------+---------------------
Reporter: sandra | Owner:
Type: defect | Status: new
Priority: major | Milestone: someday
Component: extensions | Version: 4.10.x
Keywords: imlib2 |
------------------------+---------------------
image-create calls the foreign lambda imlib_create_image which initializes
as garbage.
To fix that, it then calls (image-fill-rectangle img (color/rgba 0 0 0 0)
0 0 width height) with the purpose of setting it all as 0 0 0 0 pixels.
The problem is that doesn't work, it stays garbage, because image-fill-
rectangle doesn't overwrite pixels, it just blends with them.
As a proof of concept for this bug,
try calling (image-fill-rectangle output (color/rgba 0 0 0 0) 0 0 w h) on
an image after calling (image-fill-rectangle output (color/rgba 255 255
255 255) 0 0 w h). It'll still be white, because filling a rectangle with
transparency doesn't overwrite with transparency, it just adds
transparency "on top".
What a weird bug; I couldn't come up with a solution. Love the imlib2 egg,
but this makes create-image sort of a useless part of it. There's no
documented way to clear or erase pixels, to set them to transparent, by
using the egg.
--
Ticket URL: <http://bugs.call-cc.org/ticket/1271>
CHICKEN Scheme <http://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Chicken-janitors] #1271: Imlib2 image-create initializes w/ garbage,
Chicken Trac <=