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

opti: don't create PointD for MagickImage.Resample #1631

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/Magick.NET/MagickImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5407,18 +5407,15 @@ public void RePage()
/// <param name="resolutionY">The new Y resolution.</param>
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
public void Resample(double resolutionX, double resolutionY)
{
var density = new PointD(resolutionX, resolutionY);
Resample(density);
}
=> _nativeInstance.Resample(resolutionX, resolutionY);

/// <summary>
/// Resize image in terms of its pixel size.
/// </summary>
/// <param name="density">The density to use.</param>
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
public void Resample(PointD density)
=> _nativeInstance.Resample(density.X, density.Y);
=> Resample(density.X, density.Y);

/// <summary>
/// Resize image to specified size.
Expand Down
Loading