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

Improper call to JPEG library in state 201 #363

Closed
3 tasks done
kwhopper opened this issue Dec 17, 2018 · 10 comments
Closed
3 tasks done

Improper call to JPEG library in state 201 #363

kwhopper opened this issue Dec 17, 2018 · 10 comments
Labels
Milestone

Comments

@kwhopper
Copy link

kwhopper commented Dec 17, 2018

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am using the latest version of Magick.NET
  • I have searched open and closed issues to ensure it has not already been reported

Description

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 ---

Steps to Reproduce

var filePath = "pathToAFile.jpg";
using (MagickImage img = new MagickImage())
{
    img.Read(filePath);
}

System Configuration

  • Magick.NET version: Q16-x64, 7.9.1
  • Environment (Operating system, version and so on): Windows 10 / Server 2016
  • Additional information:
    It's like an ImageMagick problem so let me know if it should be reported there.
@dlemstra dlemstra added the bug label Dec 17, 2018
@dlemstra
Copy link
Owner

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.

@dlemstra dlemstra added this to the 7.9.2.0 milestone Dec 17, 2018
@kwhopper
Copy link
Author

Ok. Great!

@284794507
Copy link

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

@dlemstra
Copy link
Owner

@284794507 can you attach an image that demonstrates this issue?

@284794507
Copy link

attach

@284794507 can you attach an image that demonstrates this issue?

https://github.com/284794507/.Net/blob/master/麦考瑞 - 副本.jpg

@284794507
Copy link

I can't attach an image here. you can get it by that url.

@284794507
Copy link

@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

@dlemstra
Copy link
Owner

@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

@284794507
Copy link

@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
Copy link

@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

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

3 participants