public static Bitmap ToBitmap(this ITexture texture) { byte[] image = texture.DecodeTexture(); if (image == null) { return(null); } return(ToBitmap(image, texture.Width, texture.Height)); }
public static byte[] ToPng(this ITexture texture) { byte[] image = texture.DecodeTexture(); if (image == null) { return(null); } return(CreatePng(image, texture.Width, texture.Height)); }