rdpoor/rigol-grab

Mangled PNG on MacOS

Opened this issue · 1 comments

On my Windows 10 system, screen images are captured reliably. But on my Mac PowerBook, most of the time the PNG data is mangled. I'm not sure if this is timing issue or a driver issue. What's very odd is that it used to work better -- I'm not sure what's changed.

pyvisa-info tells me this:

(rigol_grab) [~/Projects/Rigol/rigol_grab]$ pyvisa-info
Machine Details:
   Platform ID:    Darwin-18.7.0-x86_64-i386-64bit
   Processor:      i386

Python:
   Implementation: CPython
   Executable:     /Users/r/.local/share/virtualenvs/rigol_grab-3CvMwpSs/bin/python3.7
   Version:        3.7.1
   Compiler:       Clang 6.0 (clang-600.0.57)
   Bits:           64bit
   Build:          Oct 20 2018 03:13:28 (#v3.7.1:260ec2c36a)
   Unicode:        UCS4

PyVISA Version: 1.9.1

Backends:
   ni:
      Version: 1.9.1 (bundled with PyVISA)
      #1: /Library/Frameworks/visa.framework/visa:
         found by: auto
         bitness: 32, 64
         Vendor: National Instruments
         Impl. Version: 18874368
         Spec. Version: 5244928
   py:
      Version: 0.3.1
      ASRL INSTR:
         Please install PySerial (>=3.0) to use this resource type.
         No module named 'serial'
      USB INSTR: Available via PyUSB (1.0.2). Backend: libusb1
      USB RAW: Available via PyUSB (1.0.2). Backend: libusb1
      TCPIP INSTR: Available 
      TCPIP SOCKET: Available 
      GPIB INSTR:
         Please install linux-gpib to use this resource type.
         No module named 'gpib'

Also, when I change the saved data format from PNG to BMP, it mostly works, and shows only a few errant lines towards the bottom of the saved image.