使用RMAGICK保存图片为文件时提示:Insufficient image data in file

语句:
  width, height, bmp = Win32_qyk::Screenshot.desktop#capture_hwnd(@ie.hwnd)
  img = Magick::Image.from_blob(bmp)
执行时报错:
in `from_blob': Insufficient image data in file `' (Magick::ImageMagickError)