rordenlab / MRIcroGL

v1.2 GLSL volume rendering. Able to view NIfTI, DICOM, MGH, MHD, NRRD, AFNI format images.
https://www.nitrc.org/plugins/mwiki/index.php/mricrogl:MainPage
Other
204 stars 32 forks source link

Background transparent in bitmaps preference resets #16

Closed apiccirilli closed 4 years ago

apiccirilli commented 4 years ago

On macOS 10.15, the option for "Background transparent in bitmaps" always resets back to false on reopening MRIcroGL. In MRIcroGL.ini, there is no ScreenCaptureTransparentBackground field, and adding that field manually to the ini file has no effect (ScreenCaptureTransparentBackground=1 in the [BOOL] section).

neurolabusc commented 4 years ago

Acknowledged. I have uploaded an updated version named MRIcroGL_macOS_issue16.dmg for MacOS. The bitmap transparency preferences are now persistent.

In addition to using the Prefernces window, you can now also set this property using in Python scripts using the gl.bmptransparent() function to make the background opaque (0) or transparent (1), so a minimal script would be:

import gl
gl.bmptransparent(1)
grandjeanlab commented 4 years ago

Hi Chris. could we have this option for other versions too (esp. Linux)? current version returns: AttributeError: module 'gl' has no attribute 'bmptransparent'

neurolabusc commented 4 years ago

Included in pre-release and subsequent releases.