Skip to content

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

@AudriusAdroiti

Description

@AudriusAdroiti

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions