# Displaying RGB 565 data

**URL:** <https://www.ruby-forum.com/t/displaying-rgb-565-data/119327>\
**Category:** Ruby-Gnome 2\
**Created:** [November 6, 2007, 2:21am UTC](https://www.ruby-forum.com/t/displaying-rgb-565-data/119327 "2007-11-06T02:21:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![burrowsm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d78d45/32.png) [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Post date:** [November 6, 2007, 2:21am UTC](https://www.ruby-forum.com/t/displaying-rgb-565-data/119327/1 "2007-11-06T02:21:01Z")

</div>

Hello,

I’m reading album art back from my iPod over the serial port. It is  
coming back as 100x100 RGB 565, little endian. Is it possible to  
display this data with Ruby/Gtk2 ? I’ve tried to create pixmaps, but no  
luck. I’ve attached a raw dump of an album cover art.

Thanks in advance,

Matt

---

<div class="post-metadata">

**Author:** ![burrowsm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d78d45/32.png) [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Post date:** [November 6, 2007, 8:59am UTC](https://www.ruby-forum.com/t/displaying-rgb-565-data/119327/2 "2007-11-06T08:59:30Z")

</div>

Hi,

does anyone know how I can load the Gnome desktop’s  
file icons into my app? I have a directory tree  
browser and I would like the icons in it to be the  
same one’s as in e.g. Nautilus.

thanks  
Dan

---

<div class="post-metadata">

**Author:** ![burrowsm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d78d45/32.png) [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Post date:** [November 6, 2007, 9:13am UTC](https://www.ruby-forum.com/t/displaying-rgb-565-data/119327/3 "2007-11-06T09:13:32Z")

</div>

On lun, 2007-11-05 at 23:59 -0800, Daniel L. wrote:

> Hi,
> 
> does anyone know how I can load the Gnome desktop’s  
> file icons into my app? I have a directory tree  
> browser and I would like the icons in it to be the  
> same one’s as in e.g. Nautilus.

I would use GnomeVFS to get the mimetype and then replace “/” with “-”  
to get the icon name and try loading it with  
Gtk::IconTheme.default.load\_icon

---

<div class="post-metadata">

**Author:** ![burrowsm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d78d45/32.png) [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Post date:** [November 6, 2007, 10:35pm UTC](https://www.ruby-forum.com/t/displaying-rgb-565-data/119327/4 "2007-11-06T22:35:50Z")

</div>

Am Dienstag, den 06.11.2007, 02:21 +0100 schrieb Matt Barclay:

> Hello,
> 
> I’m reading album art back from my iPod over the serial port. It is  
> coming back as 100x100 RGB 565, little endian. Is it possible to  
> display this data with Ruby/Gtk2 ? I’ve tried to create pixmaps, but no  
> luck. I’ve attached a raw dump of an album cover art.

Hi,

your data is not vallid. It has a size of 19980 Bytes.

An Image of 100x100 RGB 565 would have a size of 20000 Bytes  
(100_100_2).

Cheers  
detlef
