Show More
@@ -851,18 +851,26 b' class Image(DisplayObject):' | |||||
851 |
|
851 | |||
852 | Examples |
|
852 | Examples | |
853 | -------- |
|
853 | -------- | |
854 | # embedded image data, works in qtconsole and notebook |
|
854 | ||
855 | # when passed positionally, the first arg can be any of raw image data, |
|
855 | embedded image data, works in qtconsole and notebook | |
856 | # a URL, or a filename from which to load image data. |
|
856 | when passed positionally, the first arg can be any of raw image data, | |
857 | # The result is always embedding image data for inline images. |
|
857 | a URL, or a filename from which to load image data. | |
858 | Image('http://www.google.fr/images/srpr/logo3w.png') |
|
858 | The result is always embedding image data for inline images. | |
859 | Image('/path/to/image.jpg') |
|
859 | ||
860 | Image(b'RAW_PNG_DATA...') |
|
860 | >>> Image('http://www.google.fr/images/srpr/logo3w.png') | |
861 |
|
861 | <IPython.core.display.Image object> | ||
862 | # Specifying Image(url=...) does not embed the image data, |
|
862 | ||
863 | # it only generates `<img>` tag with a link to the source. |
|
863 | >>> Image('/path/to/image.jpg') | |
864 | # This will not work in the qtconsole or offline. |
|
864 | <IPython.core.display.Image object> | |
865 | Image(url='http://www.google.fr/images/srpr/logo3w.png') |
|
865 | ||
|
866 | >>> Image(b'RAW_PNG_DATA...') | |||
|
867 | <IPython.core.display.Image object> | |||
|
868 | ||||
|
869 | Specifying Image(url=...) does not embed the image data, | |||
|
870 | it only generates ``<img>`` tag with a link to the source. | |||
|
871 | This will not work in the qtconsole or offline. | |||
|
872 | ||||
|
873 | >>> Image(url='http://www.google.fr/images/srpr/logo3w.png') | |||
866 |
|
874 | |||
867 | """ |
|
875 | """ | |
868 | if isinstance(data, (Path, PurePath)): |
|
876 | if isinstance(data, (Path, PurePath)): |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file |
General Comments 0
You need to be logged in to leave comments.
Login now