diff --git a/HPPH/PixelHelper.Convert.cs b/HPPH/PixelHelper.Convert.cs index c156a1f..fcd0f88 100644 --- a/HPPH/PixelHelper.Convert.cs +++ b/HPPH/PixelHelper.Convert.cs @@ -74,6 +74,12 @@ public static unsafe partial class PixelHelper { if (source.Length == 0) return; + if (sourceFormat == targetFormat) + { + source.CopyTo(target); + return; + } + switch (sourceFormat.BytesPerPixel) { case 3 when (targetFormat.BytesPerPixel == 3):