This project is read-only.

ImageFactory throwing ArgumentException(Parameter is not valid.) with ico files

Topics: Core
Mar 7, 2014 at 12:21 AM
This is a funny bug and I wonder if anybody can relate.

On Azure (and just there, not locally) the mentioned exception is thrown from ImageFactory ln 64, from Image.FromStream(stream) when trying to upload an .ico file to Media Library. This can mean that the stream contains invalid image data. However the same image works locally, but it doesn't work on Azure (neither with Blob storage, neither with local storage).

Anybody with an idea? The image file previously to this step is save to the storage properly (it's identical, bit by bit with the reference image that works locally).
Apr 15, 2014 at 9:22 PM
I've run across the same issue, except for me it works ok with the storage emulator.

Did you find a solution?
Apr 15, 2014 at 9:50 PM
I haven't. My workaround was not to store favicons in Media Library... The strange thing is that I get the error on Azure but not locally, despite using the same Blob storage account. This lead me to the suspicion that there might be a difference in the .NET runtime version causing this but I haven't investigated further.