| 1258 | self._retina_shape() |
| 1259 | |
| 1260 | def _repr_html_(self): |
| 1261 | if not self.embed: |
| 1262 | width = height = klass = '' |
| 1263 | if self.width: |
| 1264 | width = ' width="%d"' % self.width |
| 1265 | if self.height: |
| 1266 | height = ' height="%d"' % self.height |
| 1267 | if self.unconfined: |
| 1268 | klass = ' class="unconfined"' |
| 1269 | return u'<img src="{url}"{width}{height}{klass}/>'.format( |
| 1270 | url=self.url, |
| 1271 | width=width, |
| 1272 | height=height, |
| 1273 | klass=klass, |
| 1274 | ) |
| 1275 | |
| 1276 | def _repr_mimebundle_(self, include=None, exclude=None): |
| 1277 | """Return the image as a mimebundle |