Skip to content

Commit

Permalink
Don't create PointD for MagickImage.Resample (#1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gounlaf committed May 13, 2024
1 parent 5ac3d81 commit e51dff1
Showing 1 changed file with 2 additions and 5 deletions.
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

0 comments on commit e51dff1

Please sign in to comment.