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

Breaking changes in Magick.NET 14.0.0 #1374

Closed
dlemstra opened this issue Apr 14, 2023 · 3 comments
Closed

Breaking changes in Magick.NET 14.0.0 #1374

dlemstra opened this issue Apr 14, 2023 · 3 comments
Milestone

Comments

@dlemstra
Copy link
Owner

dlemstra commented Apr 14, 2023

This issue describes the planned breaking changes for Magick.NET 14.0.0:

  • Add Chromaticity (IChromaticityInfo) to IMagickImage that combines the following properties:
    • ChromaBluePrimary
    • ChromaGreenPrimary
    • ChromaRedPrimary
    • ChromaWhitePoint
  • Remove EncodingGeometry, IsDisposed and FormatInfo from MagickImage.
  • Make MagickImage.Interlace readonly and add an option for Interlace to the MagickSettings.
  • No longer return the value of the settings in MagickImage.ColorType.
  • Correct typo of OrientationType.LeftBotom.
  • Correct type of ExifTag.TimeZoneOffset (should be short[]).
  • Change IReadOnlyCollection<T> to IReadOnlyList<T> where possible.
  • Remove GetData from IImageProfile.
  • Remove nullability from LogEventArgs.Message and IImageProfile.ToByteArray().
  • Rename LogEvents to LogEventTypes.
  • Rename DrawablePushPattern.ID to DrawablePushPattern.Id.
  • Rename EightBimValue.ID to EightBimValue.Id.
  • Rename TiffReadDefines.IgnoreExifPoperties to TiffReadDefines.IgnoreExifProperties.
  • Rename PixelCollection.GetIndex to PixelCollection.GetChannelIndex and change the return type to uint?.
  • Rename IMagickImage.Map and IMagickImageCollection.Map to Remap.
  • Rename RePage to ResetPage in IMagickImage and IMagickImageCollection.
  • Allow specifying the 6 colorspaces for PerceptualHash and switch to the new default of ImageMagick.
  • Refactor the Compare overload that now needs an IMagickImage and return the image instead.
  • Remove SrgbHuPhash and HclpHuPhash from IChannelPerceptualHash and add a new method that will return the hash and colorspace for a specified index and return null when the colorspace is invalid.
  • Make Drawable and Path classes immutable.
  • Make ErrorMetric of CompareSettings mandatory and immutable through the constructor.
  • Make ComplexOperator of ComplexSettings mandatory and immutable through the constructor.
  • Move Path and Drawable classes to a separate namespace.
  • Move Color* classes to a separate namespace.
  • Move Factory classes to a separate namespace.
  • Remove all Morphology overloads because MorphologySettings should be used instead.
  • Remove Grays, Sync and Default from the Channels.
  • Rename DdsWriteDefines.Mipmaps to DdsWriteDefines.MipmapCount.
  • Remove NearLossless from the WebPWriteDefines.
  • Correct the casing of Whitebalance to WhiteBalance in the properties of the DngReadDefines.
  • Add DistortMethod to the DistortSettings
  • Remove DeskewSettings and add a new method that should be used instead.
  • Change type of long properties from IOpenCLKernelProfileRecord to ulong and remove the AverageDuration property.
  • Change properties/arguments/return types that cannot be negative from int to uint.
  • CreateThumbnail extension method of IExifProfile will no longer be available in netstandard20.
  • Reorder enum values alphabetically: MagickFormat, PixelMapping.
  • Switch from netstandard21 to net6 (the oldest dotnet LTS)

Development notes:

  • Replace ElementAt with indexer once the switch to IReadOnlyList<T> is done.
  • Remove IReadOnlyCollection check and ObsoleteAttribute check from DrawablesGenerator.
  • Remove unnecessary casts to uint and check if Throw.IfNegative is still required.
@dlemstra dlemstra added this to the 14.0.0 milestone Apr 14, 2023
@dlemstra dlemstra pinned this issue Apr 14, 2023
@ghost
Copy link

ghost commented Jan 2, 2024

Hi, with the removal of FormatInfo, what is the new way to get the MIME type of an image? I can't figure out how it is supposed to work.

@dlemstra
Copy link
Owner Author

dlemstra commented Jan 2, 2024

Thanks for coming here and asking that question. I will update the comment to make this more clear. You should use use MagickFormatInfo.Create(image.Format) instead.

@ghost
Copy link

ghost commented Jan 2, 2024

Thanks for the help!

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