Skip to content
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

Some images break Better Image Gallery #218

Open
joeystombaugh opened this issue Aug 2, 2023 · 1 comment
Open

Some images break Better Image Gallery #218

joeystombaugh opened this issue Aug 2, 2023 · 1 comment

Comments

@joeystombaugh
Copy link

something else
When uploading the above image to better image gallery it gives an aw shucks. Checking the error log I got

System.OutOfMemoryException: Out of memory.
   at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement)
   at mojoPortal.Features.UI.BetterImageGallery.BetterImageGalleryService.CreateThumbnails(FileInfo[] images, String thumbnailCachePath)
   at mojoPortal.Features.UI.BetterImageGallery.BetterImageGalleryService.SetupThumbnails()
   at mojoPortal.Features.UI.BetterImageGallery.BetterImageGalleryRazor.RenderContents(HtmlTextWriter output)
   at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)

It is definitely an issue with the image but better image gallery should silently fail and not break like that.

@JosephMDavis
Copy link
Member

JosephMDavis commented Aug 2, 2023

turns out the images in question were webp saved as jpg and that was causing System.Drawing to have issues. We should still catch the error gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants