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

image system aggregate exception 0x88982F50 #3

Open
Manimojy opened this issue Jul 29, 2017 · 2 comments
Open

image system aggregate exception 0x88982F50 #3

Manimojy opened this issue Jul 29, 2017 · 2 comments

Comments

@Manimojy
Copy link

hi Cesar,
why do I get this error:
System.AggregateException: 'One or more errors occurred.' Exception: The component cannot be found. (Exception from HRESULT: 0x88982F50).

This happens only when I try to open some images. Here is the code excerpt:

using (Bitmap _bm = (Bitmap)System.Drawing.Image.FromStream(fileStream.AsStream()))
{
using (UnmanagedImage bmi = UnmanagedImage.FromManagedImage(_bm))
{
for (int i = 0; i < 100; i++)
{
Grayscale.CommonAlgorithms.BT709.Apply(bmi);
}
}
}
here is the 2.jpg file that is working:
2
:
here is the 3.jpg file that's throws error:
3

@anders9ustafsson
Copy link
Contributor

First of all, you should not need to work via UnmanagedImage. I recommend that you try to apply the filter immediately on the Bitmap. If that still does not work, please check the underlying pixel format of the JPEG images, this might have an impact in triggering the exception.

@Manimojy
Copy link
Author

Applying filter to Bitmap takes too much processing time, even for a single process (4% cpu); with unmanagedimage it is super fast, even with 100 iterations (0.3% cpu)

3.jpg (the problematic file) can be opened in other apps like Photos, Paint and Visual Studio. The format is 24bpp.

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

No branches or pull requests

2 participants