-
Notifications
You must be signed in to change notification settings - Fork 37
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
Specify resolution and size to be displayed inline in gridconcat, vconcat and hconcat #107
Comments
Hey @Benfeitas do you have an example image to replicate this issue, in particular, what format are these images? Funnily enough, yesterday I had an issue with resolution of postscript (.eps) files, which I fixed by scaling the vector image before rasterizing (see https://stackoverflow.com/a/56568354/5033292): from PIL import Image
eps_image = Image.open('image.eps')
# Rasterise onto 4x higher resolution grid
eps_image.load(scale=4) |
Well, that may be it as the images are .png. I had thought that having them as png would be fine since individually they look quite good, just not when you generate the new figure through |
I was able to have However, the resolution problem is still there. for some reason,
This all seems a problem that's not really related with ipypublish now, as it is mostly due to |
Yeh that's the main issue there. To have optimal resolution, you should preferably be using vector graphics (pdf, svg, eps, ...), rather than rasterized (png, jpeg, ...). But PIL only handles rasterized, converting vector graphics to rasterized on input. Obviously, you can just use methods in |
So, svgutils definitely seems the way forward here. I've just been trying it out in the notebook, and it works well. |
svglib also works well for converting the final svg to pdf |
I'm trying to use
images_gridconcat
to display a few images that I have stored locally. However, once they are displayed in a Jupyter notebook their resolution becomes much worse, probably owing to their new size. Is there a way to have them being shown with another size inline?Adjusting
width
orheight
innb_setup.images_gridconcat(images, width=3000, height=2000)
does not change their inline display.I was also able to use:
But the resolution issue is still there.
The text was updated successfully, but these errors were encountered: