rmagick via parallels

P

Paul Rogers

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
 
E

emanuel.eklund

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top