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

Unable to convert heif to jpg taken by iPhone 15 pro #4

Open
AudriusAdroiti opened this issue Aug 1, 2024 · 0 comments
Open

Unable to convert heif to jpg taken by iPhone 15 pro #4

AudriusAdroiti opened this issue Aug 1, 2024 · 0 comments

Comments

@AudriusAdroiti
Copy link

AudriusAdroiti commented Aug 1, 2024

When trying to convert heif images (taken with iPhone 15 pro) to jpg format, we get an error
Invalid input: Unspecified: Metadata not correctly assigned to image

Code snippet which throw an exception

private static async Task<Stream> EditImageInMemoryAsync(Stream orignalImage, Action<IImageProcessingContext> opereation, IImageFormat format)
        {
            var modifiedImage = new MemoryStream();
            using var image = await Image.LoadAsync(orignalImage);
            image.Mutate(opereation);
            image.Save(modifiedImage, format);
            modifiedImage.Position = 0;
            orignalImage.Position = 0;
            return modifiedImage;
}

Similar issue were fixed in this package.

bad-images.zip - zip file with images. With these images we get an error.

@AudriusAdroiti AudriusAdroiti changed the title Unable to convert heic to jpg taken by iPhone 15 pro Unable to convert heif to jpg taken by iPhone 15 pro Aug 1, 2024
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

1 participant