[Gambas-user] Gambas 3 revision #1747
Benoit Minisini
gambas at ...1...
Sun Dec 28 20:27:13 CET 2008
Hi,
For those who are in front of their computer during the X-mas holidays...
There should be, as not everone in the world celebrate X-mas and/or have
holidays at the same time...
First, you may see a lot of change in the last revision of Gambas 3.
Most of them are bug fixes ported from Gambas 2, except a new component
named "gb.image.info". This is a little present for you. :-)
That component allows you to get information about an image file without
having to fully load it.
It works this way:
WITH ImageStat(System.User.Home &/ "photo.jpg")
PRINT .Type
PRINT .Width;; .Height;; .Depth
END WITH
The Type property is a MIME type ("image/jpeg" in that example), and is got
from the file contents, not the file extension.
The Depth is 24 for a true color image, 32 for a true color image with an
alpha channel, and 8 for a palette-based image like GIF. You may get other
values.
The component have known bugs yet. For example ImageStat("~/photo.jpeg") does
not work.
So it is in alpha state at the moment.
Last, just to tell everyone too, I have to develop a component for my job
soon.
That component will allow you to make images without having to use gb.qt or
gb.gtk. It may be named "gb.image", and the current "gb.image" component
will be renamed as "gb.image.effect" or something similar.
That component will be based on the "GD" library (and libjpeg, libpng...). If
you know a better library, please tell me.
Meanwhile, enjoy "gb.image.info"!
Regards,
--
Benoit Minisini
More information about the User
mailing list