We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6399225 commit 01b2fb5Copy full SHA for 01b2fb5
1 file changed
plotdevice/gfx/image.py
@@ -63,6 +63,10 @@ def __init__(self, *args, **kwargs):
63
elif args and args[0] is None:
64
args.pop(0) # make image(None, 10,20, image=...) work properly for compat
65
66
+ # Validate that we have either a source or data
67
+ if not (src or data):
68
+ raise DeviceError("Image requires either a source (path/url/Image) or image data")
69
+
70
# get an NSImage reference (once way or another)
71
if data:
72
self._nsImage = self._lazyload(data=data)
0 commit comments