Hi,
2008/6/18 larryliuming <
larryliuming@...>:
> Yes, EV_PIXEL_BUFFER can load image which contain alpha channel data.
> What do you mean by the strange color of "half-transparent" pixels?
> Could you give me a snapshot?
>
> We can use EV_PIXEL_BUFFER to load an image, and then use
> {EV_PIXEL_BUFFER}.to_pixmap to get an EV_PIXMAP. In this way, (if the
> desktop color depth is 32bits on Windows, the EV_PIXMAP is 32bit DIB
> bitmap actually), the EV_PIXMAP contain all RGBA data. However, if the
> desktop color depth is less than 32bits (24bits, 16bits or...), than
> Windows system will automatically convert the EV_PIXMAP to a new
> bitmap which don't have alpha channel data (since desktop color depth
> is not enough).
>
> Have you tried this way?
>
> 1. Load an image through EV_PIXEL_BUFFER
> 2. Use {EV_PIXEL_BUFFER}.to_pixmap, then you get an EV_PIXMAP
> 3. Draw the EV_PIXMAP on an EV_DRAWABLE.
>
I did not tell that I am using EiffelStudio on DesktopBSD. I can try
it on Windows too but don't want to install (upgrade my previous
version) EiffelStudio only for this reason. Possibly on BSD (or Linux)
image display is different than on Windows?
I have attached a snapshot of a window produced by the following code
(a simple default EiffelVision application) (the pixmaps inserted here
are following from left to right in the window):
build_main_container is
-- Create and populate `main_container'.
require
main_container_not_yet_created: main_container = Void
local
pixmap: EV_PIXMAP
pixel_buffer: EV_PIXEL_BUFFER
do
create main_container
create pixmap
pixmap.set_with_named_file ("test1.png")
main_container.extend (pixmap)
create pixel_buffer
pixel_buffer.set_with_named_file ("test1.png")
create pixmap.make_with_size (100,100)
pixmap.draw_pixmap (0,0,pixel_buffer.to_pixmap)
main_container.extend (pixmap)
create pixmap.make_with_pixel_buffer (pixel_buffer)
main_container.extend (pixmap)
ensure
main_container_created: main_container /= Void
end
All the three cases have a different result but none is correct. In
the first image it looks like that there is some garbage displayed
"behind" the image (this differs at every run), so the image is
displayed correctly (with transparency) over a "garbage" background.
In the other cases the image is displayed correctly over a black
background (?) until the transparency becomes 50%, then nothing at all
is drawn. This is possibly a bug? The source code of the application
is attached, you can try how it looks on your system.
>
> Could you tell me the icons which not look nice exactly?
I have attached another snapshot, of EiffelStudio with a dark
background color (I don't use such color normally but here we can see
the icon issues). Especially at the breakpoint icons and some of the
class view icons there are white pixels at the edge.
Balazs Keri
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/eiffel_software/<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/eiffel_software/join (Yahoo! ID required)
<*> To change settings via email:
mailto:
eiffel_software-digest@...
mailto:
eiffel_software-fullfeatured@...
<*> To unsubscribe from this group, send an email to:
eiffel_software-unsubscribe@...
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/