javascript and pixbuf color
- From: Pavol Klacansky <pavol klacansky com>
- To: gtk-app-devel-list gnome org
- Subject: javascript and pixbuf color
- Date: Tue, 11 Oct 2011 21:41:26 +0100
Hi,
how can I get color of one pixel (rgba)?
I have tried this, but it does not work, coz it returns number, and in
JS pointers not work
const GdkPixbuf = imports.gi.GdkPixbuf
let pixbuf = GdkPixbuf.Pixbuf.new_from_file('zive.ico')
let nChannels = pixbuf.get_n_channels()
let pixels = pixbuf.get_pixels()
let rowstride = pixbuf.get_rowstride()
x = 0
y = 0
p = pixels + y * rowstride + x * nChannels
Thanks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]