You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
:
here is the 3.jpg file that's throws error:
The text was updated successfully, but these errors were encountered:
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.
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.
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:
:
here is the 3.jpg file that's throws error:
The text was updated successfully, but these errors were encountered: