rmagick via parallels

Discussion in 'Ruby' started by Paul Rogers, Feb 29, 2008.

  1. Paul Rogers

    Paul Rogers Guest

    I have some code that Im sure used to work on Vista under parallels,
    but now only works on Vista on a PC hardware.

    Im using Win32::Screenshot to capture the windows screen, and then
    using rmagick to save to a file

    I now get this exception
    Insufficient image data in file `'
    :in `from_blob'

    the code looks like this

    width, height, bmp = Win32::Screenshot.desktop
    puts "image data height = #{height} width = #{width}"
    puts "bmp size is #{bmp.size}"
    img = Magick::Image.from_blob(bmp)[0]

    I see this displayed

    Taking screenshotimage data height = 984 width = 1595
    bmp size is 4708494


    the gem versions are

    rmagick (1.15.9)
    RMagick is an interface between the Ruby programming language and
    the ImageMagick and GraphicsMagick image processing libraries.
    win32screenshot (0.0.2)
    Capture Screenshots on Windows with Ruby

    and are the same on win and win-parallels.
    can any one tell me what it means, and how to fix?

    Thanks
    Paul
    Paul Rogers, Feb 29, 2008
    #1
    1. Advertising

  2. Paul Rogers

    Guest

    On Mar 1, 1:13 am, Paul Rogers <> wrote:
    > I have some code that Im sure used to work on Vista under parallels,
    > but now only works on Vista on a PC hardware.
    >
    > Im using Win32::Screenshot to capture the windows screen, and then
    > using rmagick to save to a file
    >
    > I now get this exception
    > Insufficient image data in file `'
    > :in `from_blob'
    >
    > the code looks like this
    >
    > width, height, bmp = Win32::Screenshot.desktop
    > puts "image data height = #{height} width = #{width}"
    > puts "bmp size is #{bmp.size}"
    > img = Magick::Image.from_blob(bmp)[0]
    >
    > I see this displayed
    >
    > Taking screenshotimage data height = 984 width = 1595
    > bmp size is 4708494
    >
    > the gem versions are
    >
    > rmagick (1.15.9)
    > RMagick is an interface between the Ruby programming language and
    > the ImageMagick and GraphicsMagick image processing libraries.
    > win32screenshot (0.0.2)
    > Capture Screenshots on Windows with Ruby
    >
    > and are the same on win and win-parallels.
    > can any one tell me what it means, and how to fix?
    >
    > Thanks
    > Paul


    Hi!

    I also have this problem. It seems that it occurs when the image is to
    big. When I reduced the window that I wanted to make a snapshot of it
    works. Please post here again if you find out how to handle bigger
    images.

    /Malle
    , Apr 9, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gerry Hickman
    Replies:
    2
    Views:
    1,489
    Gerry Hickman
    Dec 14, 2005
  2. Doug McCorkle
    Replies:
    0
    Views:
    232
    Doug McCorkle
    Jul 2, 2009
  3. Guido Holz
    Replies:
    2
    Views:
    138
    Guido Holz
    Jan 30, 2008
  4. Pito Salas
    Replies:
    1
    Views:
    125
    Tim Hunter
    Apr 24, 2009
  5. aum

    JS Parallels to Forth

    aum, Sep 18, 2006, in forum: Javascript
    Replies:
    2
    Views:
    92
    Jake Barnes
    Sep 19, 2006
Loading...

Share This Page