# Re: Gtk-Demo - images.rb

**URL:** <https://www.ruby-forum.com/t/re-gtk-demo-images-rb/57240>\
**Category:** Ruby-Gnome 2\
**Created:** [April 8, 2006, 2:30pm UTC](https://www.ruby-forum.com/t/re-gtk-demo-images-rb/57240 "2006-04-08T14:30:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Masao\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/839c29/32.png) [@Masao\_M](https://www.ruby-forum.com/u/Masao_M)\
**Post date:** [April 8, 2006, 2:30pm UTC](https://www.ruby-forum.com/t/re-gtk-demo-images-rb/57240/1 "2006-04-08T14:30:47Z")

</div>

Hi,

On Wed, 5 Apr 2006 19:11:57 -0500 (CDT)  
removed\_email\_address@domain.invalid wrote:

> Hey All,
> 
> I found the problem with the GTK-Demo program for  
> the progressive image loading.=A0 It’s really a simple fix:
> 
> Line 157 Reads: @image\_stream =3D File.open(filename,‘r’)  
> Line 157  
> Should Be: @image\_stream =3D File.open(filename,‘rb’)

> This change  
> allows the image to be opened in binary format.=A0 Should explictly  
> state that, instead of relying on the ‘r’ mode, no matter the  
> platform.=A0 Once you add the binary flag to the File#open, everything  
> works as it should, and it runs just fine.

Thanks. Applied.

> Also,  
> per=A0 S. Weinmann’s suggestion, I’ll be creating a couple of libraries  
> to Package Glade files into a ZIP file, and allow Loading from it.=A0  
> Also, in conjunction with it, I’ll be creating a new GUI Wrapper around  
> Glade files for Ruby Apps.=A0 Among them, will be the ability to  
> package Image files into the ZIP File, and load them directly from the ZIP  
> file, as well as a cleaner way to package the signal\_connect’s, by looking  
> into the method\_missing function as a way=A0to get signal\_connect’s  
> done, without having to fully define it.

Cool ;).
