예제 #1
0
 public static DDSMetadata GetMetadataFromDDSMemory(byte[] buffer)
 {
     if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
     {
         var md  = TexconvNative.GetMetadataFromDDSMemory(buffer, DDSFLAGS.DDS_FLAGS_NONE);
         var bpp = TexconvNative.BitsPerPixel(md.format);
         return(new DDSMetadata(md, (uint)bpp, true));
     }
     else
     {
         throw new NotImplementedException();
     }
 }
예제 #2
0
        public static DDSMetadata GetMetadataFromTGAFile(string path)
        {
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                var md  = TexconvNative.GetMetadataFromTGAFile(path, TGA_FLAGS.TGA_FLAGS_NONE);
                var bpp = TexconvNative.BitsPerPixel(md.format);
                return(new DDSMetadata(md, (uint)bpp, true));
            }
            else
            {
                //using (var image = Image.Load(path))
                //{

                //}
                throw new NotImplementedException();
            }
        }