conformal / gotk3

Go bindings for GTK3
ISC License
470 stars 81 forks source link

Implemented image.Image interface for gdk.Pixbuf #54

Closed vvanpo closed 5 years ago

vvanpo commented 10 years ago

This might not strictly be a "binding", so maybe things like this should go in a separate file/folder?

The code uses the assumption that there are either 3 or 4 channels, at 8 bits each, because that is all that seems to be supported in GDK at the moment.

vvanpo commented 10 years ago

Just thought about this, Go uses pre-multiplied RGBA values, but I can't find anything in the GDK documentation that explains which kind it uses by default. I'll have to do some further testing on this.

weberc2 commented 10 years ago

Whoa. Cool. I was just thinking about this the other day. I vaguely recall seeing something in the GDK documentation about it using some standard X pixel array format or something. Hopefully that helps.

jrick commented 10 years ago

If the pixel order isn't specified anywhere, it would not surprise me if it's dependant on the machine architecture. Something to keep in mind, since Go 1.4 will come with a power64 port (big endian).