mirror of
https://github.com/DarthAffe/HPPH.git
synced 2025-12-12 13:28:37 +00:00
Added special case check for converison into the same format as the source
This commit is contained in:
parent
dd5f742b48
commit
6f762f7ad6
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user