Not using Shoes, but here is a code fragment using rmagick that has
worked for me (the tifs are gziped to save space on disk)
Zlib::GzipReader.open("imagefiles/" + fname + ".tif.gz"){|gz|
gzb = gz.read
izb = ImageList.new
izb.from_blob(gzb)
tcat = izb[0].crop(440,367,4565,1520)
tcat.write(fname +".tif")
}
The image is in memory (gzb) and is put into an ImageList with the
from_blob method. It can then be manipulated and written back out or
displayed (in a separate window..)
On Sun, 2008-11-23 at 19:14 -0500, Tieg Zaharia wrote:
> I haven't been able to get the rmagick gem installed on Shoes on
> Leopard (it's an older build of Shoes), but I'd recommend just using
> backticks instead of RMagick (ie `mogrify bla bla`) to avoid mem
> leaks.
>
>
> -tieg
>
> On Sun, Nov 23, 2008 at 7:10 PM, Devyn Cairns <[EMAIL PROTECTED]>
> wrote:
> What platform are you on??? Windows, Linux or Mac?
>
>
> On Sat, Nov 22, 2008 at 5:46 PM, Ryan Baxter
> <[EMAIL PROTECTED]> wrote:
> > I don't mind saving the images to disk temporarily. I'm
> stuck just trying
> > to referencing it. The method below doesn't seem to work.
> >
> > Shoes.setup do
> > gem 'rmagick'
> > end
> >
> >
> > On Sat, Nov 22, 2008 at 1:01 PM, Devyn Cairns
> <[EMAIL PROTECTED]>
> > wrote:
> >>
> >> For that to happen, there would have to be a way to load an
> image from
> >> a string, or you would have to use Tempfile. I think the
> former would
> >> be better because it opens up so many other possibilities.
> >>
> >> On Sat, Nov 22, 2008 at 9:05 AM, Ryan Baxter
> <[EMAIL PROTECTED]> wrote:
> >> > Is there a way to use RMagick in a Shoes app?
> >> >
> >>
> >>
> >>
> >> --
> >> ~devyn
> >
> >
>
>
>
>
> --
> ~devyn
>
>