diff --git a/Program.cs b/Program.cs index 8d29d4a..eb72f98 100644 --- a/Program.cs +++ b/Program.cs @@ -125,14 +125,19 @@ void main() { public class Texture : IDisposable { public int Handle; + public int Width; + public int Height; public Texture(string path) { Image image = Image.Load(path); - Console.WriteLine($"image loaded: {image.Width}x{image.Height}"); + Width = image.Width; + Height = image.Height; + Console.WriteLine($"image loaded: {Width}x{Height}"); + //foreach (IExifValue exif in image.Metadata.ExifProfile.Values) { // Console.WriteLine($"{exif.Tag} : {exif.GetValue()}"); //} - byte[] pixelBytes = new byte[image.Width * image.Height * Unsafe.SizeOf()]; + byte[] pixelBytes = new byte[Width * Height * Unsafe.SizeOf()]; image.CopyPixelDataTo(pixelBytes); image.Dispose();