Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen capture will not save the screen into PNG #135

Closed
jopasi opened this issue Sep 24, 2018 · 4 comments
Closed

Screen capture will not save the screen into PNG #135

jopasi opened this issue Sep 24, 2018 · 4 comments

Comments

@jopasi
Copy link

jopasi commented Sep 24, 2018

Hello,

Thank you for your lackey app, I really like to use it.
Now, I have faced an interesting issue: I would like to save a screen or part of the screen into a file.
This method works using Sikulix IDE but fails with lackey: ValueError: rename: embedded null character in ... (It means for me the screen file was not created.)

s = Screen()
filename= s.capture(s.getBounds())
shutil.move(filename, r'C:\picturelib\image.png')

Using Sikulix IDE the filename is saved under C:\users\userprofile\AppData\Local\Temp\Sikulix... folder
But using lackey module the s.capture() will not save into this location because Sikulix is not run.
May I ask you to check and somehow fix this issue (to save screen image file into a library?

Thank you,
Lac

@maxdule
Copy link

maxdule commented Oct 15, 2018

You should use saveScreenCapture() method from the Screen module.

@glitchassassin
Copy link
Owner

That's a good temporary solution, but Lackey should properly replicate the original SikuliX behavior as well. Tagging this as a bug to fix.

@glitchassassin
Copy link
Owner

Fix now present in the Develop ring.

@glitchassassin
Copy link
Owner

Fix released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants