question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plotter: the first screenshot is blank + image quality issue

See original GitHub issue

Hi, I have stumbled into an issue with screenshooting today. Minimal example:

import vedo
vedo.embedWindow(False)

corners = [[-20,-20], [20,20]]
plane = vedo.shapes.Rectangle(*corners, c='lightgrey') # alpha<1 makes it immediately invisible when looking from above
sphere = vedo.shapes.Sphere(pos=(0,0, 10),r=2)


plotter = vedo.plotter.Plotter(axes=7, interactive=False)
plotter.add([sphere, plane])
plotter.show()
plotter.screenshot('test.png') 
plotter.screenshot('test2.png') 
plotter.close()
  • The first screenshot is just blank, the second is saved normally.
  • Same with vedo.io.screenshot (both when saving to file or to a numpy array).
  • My OS is Windows. I use the latest version vedo 2020.4.0.
  • Same behaviour from jupyter notebook or a script.

The second issue is that the screenshot, generated with offscreen option seem to have conisderably lower quality. For now I am just going to not use this option, but I was just surprised by this behaviour.

Cheers, icemtel

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
DeepaMahmcommented, Nov 7, 2020

If I run your example with interactive=0, then the screenshot is blank, with dark-grey color (before is was all white).

I had the same issue and it helped after installing vtk version 9.0

1reaction
icemtelcommented, Oct 14, 2020

@marcomusy I think “team discussions” and “discussions” are different things (confusing indeed!). Perhaps github discussions are still in beta and you should ask to enable it here? https://github.community/t/can-one-apply-for-github-discussions-beta/121120/2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Screenshots do not print properly; the sides are cut off and...
When I print out a document with a screenshot in it, the printout has ... Depending on few things including resolution the image...
Read more >
Subject: Microsoft Paint - - - Problem: Same Screenshot file
His display resolution is 1920X1080. His complaint is that after he pastes the screenshot into “MS Paint and saves a .png file screenshot...
Read more >
Printing Black Boxes | How to Fix Your Pictures
Fix Black Squares Issue with the following steps: · Choose File –> Print · Click on Advanced · Check the “Print as Image”...
Read more >
Increasing resolution when performing screenshots · Issue #103
Description Hi, I'm willing to create a "high-quality" png file of a 2D case. In paraview it is possible to set the magnification...
Read more >
How To Enlarge a Low Resolution Image For Print ... - YouTube
Has there ever been a time when you had a low resolution image you want to print? Maybe a screenshot of something or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found