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

Feature: Show Image As Function #89

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

daredoes
Copy link
Collaborator

This pull request will add a function that attempt to open a filepath and display the image using the default image editor, most likely Preview.

@jaredks
Copy link
Owner

jaredks commented Dec 10, 2018

Traceback (most recent call last):
  File "rumps/rumps.py", line 1050, in callback_
    return _call_as_function_or_method(callback, self)
  File "rumps/rumps.py", line 380, in _call_as_function_or_method
    return method(event)
  File "test.py", line 22, in show_image
    rumps.show_image('test.png')
  File "rumps/rumps.py", line 208, in show_image
    return _nsimage_window_from_file(image)
  File "rumps/rumps.py", line 273, in _nsimage_window_from_file
    window = NSImageView.alloc().init(image)
TypeError: Need 0 arguments, got 1

Are you not getting that error?

I fixed it with,

window = NSImageView.alloc().init()
window.setImage_(image)

but nothing appears to happen.

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

Successfully merging this pull request may close these issues.

2 participants