Conversion to TIFF? like EncodeToTIFF()

I making tool to edit texture files in project and it’s working.

I have my array of pixels Color32[ ] setted to texture with myTexture.SetPixels32(pixels); and using them to File.WriteAllBytes(filePath, myTexture.EncodeToPNG());
But I need possibility to do it on TIFF files.

Maybe there is some light solution for that?

Thanks.

something like this could work on windows pc’s,

Thanks, but can I deal with lack of “System.Windows” namespace?
Encoders needs “System.Windows.Media.Imaging”

usually works if add that dll to your project root folder

1 Like

There are needed three dlls, WindowsBase.dll, PresentationFramework.dll and PresentationCore.dll
and then all classes are supported in visual studio.
But sadly I can’t create palette with my pixels because System.Windows.Media.Color is spamming initialization error whenever I want to assign any value to any of its variables.

System.TypeInitializationException: An exception was thrown by the type initializer for —> System.InvalidProgramException: Invalid IL code in :.cctor (): IL_0032: call 0x0a00000c

Like nothing about that online for System.Windows.Media.Color