Many JPG files will not read and give this error:
ImageMagick.MagickCorruptImageErrorException: 'Improper call to JPEG library in state 201 `[path to file]' @ error/jpeg.c/JPEGErrorHandler/333'
I have a number of examples but the files don't belong to me. If this is a definite bug and there is a way to get them to you securely that would be best.
I did testing with older Nuget versions all the way back to 7.1 or so and all of them have the same problem. Programs like Irfanview and MSPaint on Windows have no problem opening these.
--- EDIT: This only occurs on 7.9.1 ---
var filePath = "pathToAFile.jpg";
using (MagickImage img = new MagickImage())
{
img.Read(filePath);
}
I am now working on a new release to resolve this issue. It has also been reported for ImageMagick and it was fixed there yesterday. A new release should be available in a couple hours.
Ok. Great!
I am now working on a new release to resolve this issue. It has also been reported for ImageMagick and it was fixed there yesterday. A new release should be available in a couple hours.
this bug is still exsit in Magick.NET-Q8-AnyCPU 7.11.0
@284794507 can you attach an image that demonstrates this issue?
attach
@284794507 can you attach an image that demonstrates this issue?
https://github.com/284794507/.Net/blob/master/麦考瑞 - 副本.jpg
I can't attach an image here. you can get it by that url.
@284794507 can you attach an image that demonstrates this issue?
Improper call to JPEG library in state 201 `C:\Users**\麦考瑞 大尺寸.jpg' @ error/jpeg.c/JPEGErrorHandler/333
@284794507 I can open your image without any issues:
C#
using (var image = new MagickImage(@"I:\麦考瑞 - 副本.jpg"))
{
}
Are you reading the file differently?
p.s. There is an edit button for comments
@284794507 I can open your image without any issues:
using (var image = new MagickImage(@"I:\麦考瑞 - 副本.jpg")) { }Are you reading the file differently?
p.s. There is an edit button for comments
error code
ImageMagick.MagickImage mi = new ImageMagick.MagickImage(path);
在 ImageMagick.NativeInstance.CheckException(IntPtr exception, IntPtr result)
在 ImageMagick.MagickImage.NativeMagickImage.ReadFile(MagickSettings settings)
在 ImageMagick.MagickImage.Read(String fileName, MagickReadSettings readSettings, Boolean ping)
在 ImageMagick.MagickImage..ctor(String fileName)
@284794507 I can open your image without any issues:
using (var image = new MagickImage(@"I:\麦考瑞 - 副本.jpg")) { }Are you reading the file differently?
p.s. There is an edit button for comments
I am sorry,I get a fake BUG,
I update to 7.11.0, but it didn't work.
Now I can open that file