rumps icon indicating copy to clipboard operation
rumps copied to clipboard

Feature: Show Image As Function

Open daredoes opened this issue 7 years ago • 1 comments

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.

daredoes avatar Nov 28 '18 04:11 daredoes

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.

jaredks avatar Dec 10 '18 02:12 jaredks