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

Add API for metadata conversion between formats. #2751

Merged
merged 43 commits into from
Jul 31, 2024

Conversation

JimBobSquarePants
Copy link
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

This is one of those monster PRs that everyone hates but since it touches all image formats was unavoidable.

This PR stems from the v4 roadmap discussion here.

It does three things.

  1. Builds upon and replaces the work done in Add smart animated format conversion. #2588 to allow conversion between animated image formats. This allows accurate conversion between all image formats.
  2. Exposes rich metadata with PixelTypeInfo that describes the pixel format of the encoded image.
  3. Normalizes the synchronization of profile (EXIF) metadata upon save.

Two bridging metadata types FormatConnectingMetadata and FormatFrameConnectingMetadata have been introduced along with interfaces IFormatMetadata, IFormatMetadata<TSelf>, IFormatFrameMetadata, IFormatFrameMetadata<TSelf> which enforce conversion APIs between all our format metadata types.

Naming conventions, type usage, and behavior has also been normalized across all our metadata types.

PixelColorType has been expanded to allow for exotic types not used in our own pixel formats and is now present alongside PixelComponentInfo and PixelAlphaRepresentation in the PixelTypeInfo instance returned with ImageInfo.

@JimBobSquarePants JimBobSquarePants merged commit 8da27c9 into main Jul 31, 2024
5 checks passed
@JimBobSquarePants JimBobSquarePants deleted the js/format-conversion branch July 31, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant