Skip to content

Script-generated screenshot not matching window #45

@Lestropie

Description

@Lestropie

Describe the bug

Attempting to generate an image from a script yields geometry other than what is requested / shown visually.

Could not find anything in the MRIcroGL list of library functions that could force a GL window update within the script; a gl.wait() doesn't seem to do it.

Version

version 6-October-2021 (v1.0.20211006)

Surf Ice 1.0.20211006+ 64-bit x86-64GTK2 Linux LLVM StaticPythonBridge 
 www.mricro.com :: BSD 2-Clause License (opensource.org/licenses/BSD-2-Clause)
PythonBridge
 Scale 87.1677
 Origin 34.5208x-17.6963x15.8235
 Mesh Vertices 40962 Faces 81920 Colors 0
    0.5386..68.5030  -104.8640..69.4714 -48.3929..80.0398
 Track Vertices 0 Faces 0 Count 0
 Node Vertices 0 Faces 0
 GPU Intel :: OpenGL  4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.3 :: GLSL 4.60

To Reproduce

  1. Create copy of Resources/script/fmri_mesh.py as mwe.py
    (have reproduced with other Python scripts)
  2. Add to tail of mwe.py a call to gl.savebmp('<imagepath>')
  3. Execute surfice -S mwe.py
  4. Look at content of
  5. Run script from GUI using "Scriptiong - Run"
  6. Look at updated content of

Expected behavior

An image that matches the geometry in the presented graphical window.


Screenshots

(pasted as-is; exported images have a lot of empty space, hence the apparent need for excessive scrolling)

Generated by script when executed as part of command startup:

Image

GUI window:

Image

Re-running the script from the GUI controls:

Image

Desktop:
Linux 22.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions