<MegaWatS>
let visual = Gdk.Visual.get_best ~depth:img_bpp ~kind: `TRUE_COLOR () in
<MegaWatS>
does anyone know what that could mean? :[
<MegaWatS>
well, apart from that that call failed, obviously
<MegaWatS>
I mean, WHY
<two-face>
dunno
<MegaWatS>
8[
<gene9>
very informative ocaml exception :(
<MegaWatS>
well I'm trying to create a bitmap
<gene9>
i've got the same on my mdk box
<MegaWatS>
and it uses such a "visual" to describe it's properties, such as color depth
<MegaWatS>
so I'm trying to use Gdk.Visual.get_best to create a visual with my desired properties
<MegaWatS>
but it doesn't work :(
<MegaWatS>
because it always throws this exception
<karryall_>
MegaWatS: proably means X can't support your desired properties
<MegaWatS>
well but I'm not even on X
<MegaWatS>
but on windows
<karryall_>
ah :)
<MegaWatS>
why shouldn't windows support a 24-bits-per-pixel truecolor visual?
<karryall_>
maybe it prefers 32 bits ?
<MegaWatS>
well but windows usually supports[21:53:48] <lus|sefu> \o/ opoc \o/
<MegaWatS>
[21:53:49] <lus|sefu> \o/ MegaWats \o/
<MegaWatS>
[21:53:56] <lus|sefu> \o/ Albstein \o/
<MegaWatS>
[21:54:07] <lus|sefu> /o\DoeNAMaNN /o\
<MegaWatS>
whoops sorry
<Dybbuk>
Heheheh. :)
<MegaWatS>
i accidentally hit ctrl+v
<MegaWatS>
what I was just trying to say
<MegaWatS>
windows supports bitmaps in any bit-depth etc
<MegaWatS>
and I want to create a bitmap with that exact color depth and format
<MegaWatS>
I mean, gtk, after all, was used to write the gimp, so it should be possible to create a bitmap in any format one wants, shouldn't it?
<karryall_>
seems to be a windows/GTK problem
<karryall_>
GTK was written for X
<karryall_>
it was ported to windows afterwards
graydon has joined #ocaml
<MegaWatS>
:(
smklsmkl has joined #ocaml
smkl has quit [Remote closed the connection]
gene9 has quit [Read error: 104 (Connection reset by peer)]
gene9 has joined #ocaml
jao has joined #ocaml
gene9 is now known as gene9-afk
jao has quit [Client Quit]
<MegaWatS>
hmm+
<MegaWatS>
so does anyone know of an easier way to do this?
<karryall_>
do what ?
<MegaWatS>
I want to display an image which I have available in a bigarray in (for example) RGB format with lablgtk
<MegaWatS>
[22:46:38] <MegaWatS> I want to display an image which I have available in a bigarray in (for example) RGB format with lablgtk <-- just that
<MegaWatS>
I have loaded an image wghich was stored as a .jpeg inside of a .zip file
<MegaWatS>
and now I want to display it
<MegaWatS>
and I need the least possible latency from the request to have it grabbed out of the zip, decoded and displayed
<karryall_>
didn't you adapt the lablgtk function for creating an image from a string so that it could work with a bigarray ?
<MegaWatS>
well for now I converted the string into a bigarray
<MegaWatS>
but that doesn't help
<MegaWatS>
because I can't create a visual with my desired properties
<MegaWatS>
I can't create an image with those properties
<MegaWatS>
now I've tried it with a pixmap
<MegaWatS>
but that seems to want the data to be in .xpm format :/
<MegaWatS>
but there has to be an easier way
<MegaWatS>
I mean, it can't be true that it is this hard with a gui toolkit to do something trivial like display an image?
<karryall_>
there's module in GTK for loading from files
<karryall_>
ut I'm not sure they were wrapped in lablgtk
<Dybbuk>
two-face: I see you're preparing to explore the Dark Side. :)
<MegaWatS>
anyway I don't think that would cover my needs
<karryall_>
module GdkPixbuf
<MegaWatS>
I'm already starting to thinjk that maybe I should just write my game with SDL, but then it won't have as nice an interface :|
<MegaWatS>
hmm
<karryall_>
you can mix GTK and SDL
<MegaWatS>
how so?
<karryall_>
ask smkl : he does that in his project
<two-face>
Dybbuk: i'm curious :)
<two-face>
Dybbuk: i'm an explorer :)
<karryall_>
basically there's nothing special to do
<Dybbuk>
two-face: It's a great thing to learn, I think. :)
<two-face>
Dybbuk: i'm too interested in functional for not trying this
<MegaWatS>
karryall_: thanks
<MegaWatS>
judging from what I read in the .mli file, that seems to be exactly what I need!
<karryall_>
which .mli ? GdkPixbuf ?
<MegaWatS>
yes
<MegaWatS>
a Gpointer.region is basically just a bigarray :)
<MegaWatS>
at least, from what I read in gpointer.mli
<karryall_>
indeed
gene9-afk is now known as gene9
<two-face>
bye
two-face has left #ocaml []
<MegaWatS>
hmm
<MegaWatS>
unbount value GdkPixbuf.from_data
<MegaWatS>
:|
gl has joined #ocaml
<MegaWatS>
gdkPixbuf seems to be missing in the windows port of lablgtk :|
<karryall_>
it's in version 1.2.5 of lablgtk
<karryall_>
maybe the windows port isn't up to date
<MegaWatS>
well its there in the source distribution, but the .c file of it won't compile :|
<MegaWatS>
also, the only thing the ['a] GDraw.drawable method put_rgb_data seems to do is to crash :/
qnix has joined #ocaml
qnix has left #ocaml []
<karryall_>
humm
<karryall_>
it is associated with GNOME in lablgtk build process
<karryall_>
although gdk-pixbuf itself doesn't need GNOME
<karryall_>
try to muck with the Makefile !
<MegaWatS>
hum
TachYon25 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
<MegaWatS>
AH!
<MegaWatS>
i think i found the error
<MegaWatS>
you have to manually call the Gdk.Rgb.init function before using the #put_rgb_data method
gl has quit [No route to host]
Dalroth has quit []
malc has joined #ocaml
<MegaWatS>
hmm
<MegaWatS>
how do I add a scrollbar to a listbox? :|
malc has quit [Read error: 110 (Connection timed out)]