-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Ensure gmic display works in Jupyter #63
Comments
Possibly:
|
Jupyter detection techniques: In short, detecting a gui (be it web or Qt) boils down to: |
We could, depending on availability on the client's Jupyter notepad:
|
|
The pure-Python implementation could be like: def gmic_run(command, images):
# image processing .. changing 'images' in place
if "DISPLAY" not in sys.environ:
for pos, image in enumerate(images):
#get image base64 or have it saved to temp files in the same gmic.run() run or another one
try:
import matplotlib.pyplot
if image_names and pos < len(image_names):
pyplot.title(image_names[pos]) #use gmic image names if available
#save image or make it b64
pyplot.show(image_saved_or_b64)
except:
try:
from IPython.core.display import Image, display
display(Image('image_path...', unconfined=True)) Will implement something not today |
the "display" command within a jupyter / ipython / X-less environment will (now just with a
This implementation with temporary files instead of base64 has yet to be bulletproved for web interfaces... I shall try with jupyter in a local web browser. calling My goal here is not to do a full fledge support of all ways to reinterpret the |
|
…lay=True toggle, adding warnings
Now works well without any command to write for UNIX users. See #64 (comment) |
…module start, fix display-less output images order, better messages
Wurlitzer's code shows that when IPython has no kernel available, we are in within a terminal Python context, and wurlitzer itself is useless. |
Good enough, will not be automatically tested, in order to give more time for other tasks |
|
Nice to have - result image display
The text was updated successfully, but these errors were encountered: