mirror of
https://github.com/DarthAffe/HPPH.git
synced 2026-11-11 19:36:34 +00:00
Added special case check for converison into the same format as the source
This commit is contained in:
1 parent
dd5f742b48
commit
6f762f7ad6
1 file changed
+6
@@ -74,6 +74,12 @@ public static unsafe partial class PixelHelper
|
|||||||
{
|
{
|
||||||
if (source.Length == 0) return;
|
if (source.Length == 0) return;
|
||||||
|
|
||||||
|
if (sourceFormat == targetFormat)
|
||||||
|
{
|
||||||
|
source.CopyTo(target);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (sourceFormat.BytesPerPixel)
|
switch (sourceFormat.BytesPerPixel)
|
||||||
{
|
{
|
||||||
case 3 when (targetFormat.BytesPerPixel == 3):
|
case 3 when (targetFormat.BytesPerPixel == 3):
|
||||||
|
|||||||
Reference in new issue
Block a user