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

Adding PNGs to pages via the WYSIWYG results in an exception being thrown #145

Open
PonchoPowers opened this issue Jun 27, 2018 · 8 comments
Assignees
Labels

Comments

@PonchoPowers
Copy link
Contributor

Trying to add PNGs to pages via the WYSIWYG results in the following exception being thrown:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

[ExternalException (0x80004005): A generic error occurred in GDI+.]
    System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) +572
    Kaliko.ImageLibrary.ImageOutput.SaveFile(KalikoImage image, String fileName, Int64 quality, String imageFormat, Boolean saveResolution) +165
    Kaliko.ImageLibrary.KalikoImage.SaveJpg(String fileName, Int64 quality, Boolean saveResolution) +31
    KalikoCMS.Admin.Content.Dialogs.EditImageDialog.SaveImage() +715
    KalikoCMS.Admin.Content.Dialogs.EditImageDialog.SubmitHandler(Object sender, EventArgs e) +16
    System.Web.UI.HtmlControls.HtmlButton.OnServerClick(EventArgs e) +134
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1665
@PonchoPowers
Copy link
Contributor Author

jpgs work fine though

windows 10

using KalikoCMS.Core-1.2.0

image

the error appears after selecting the file and clicking on the "Select file" button:
image

@PonchoPowers
Copy link
Contributor Author

@PonchoPowers
Copy link
Contributor Author

PonchoPowers commented Jun 27, 2018

The following is the file being used, which can be used to help reproduce the problem:
https://user-images.githubusercontent.com/7858744/41981697-727f4502-7a21-11e8-9e9b-bed1f12946c0.png

@fschultz fschultz self-assigned this Jun 28, 2018
@fschultz fschultz added the bug label Jun 28, 2018
@fschultz
Copy link
Contributor

Thanks for reporting the issue. What version of ImageLibrary are you running in your project?

@fschultz
Copy link
Contributor

fschultz commented Jul 5, 2018

I've tried to reproduce using the image provided but I don't seem to get the error. It's surprising that it seems format dependent since the error is raised in the save method. I wonder if it can be caused by some kind of file lock I'll continue to see if I can reproduce it.

@PonchoPowers
Copy link
Contributor Author

Sorry for the delay this has been hard to reproduce from my side too. It looks as if the problem is related to spaces in files, can you try uploading a file with a space in the name to see if it fails or not for you?

@PonchoPowers
Copy link
Contributor Author

To answer your earlier question of version, the version in use is Kaliko.ImageLibrary 3.0.0.0.

@fschultz
Copy link
Contributor

Unfortunately I haven't been able to reproduce this issue. I'm planning to move away from GDI+ in order to be able to add .NET Core compatibility which eventually also will solve this issue, But it would be nice to have a solution for this problem before then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants