private SixLabors.Primitives.Size LoadPng(MemoryStream stream) { using (Image <Rgba32> image = CoreImage.Load <Rgba32>(stream)) { return(new SixLabors.Primitives.Size(image.Width, image.Height)); } }
public void ReadImages() { if (this.bmpStream == null) { this.bmpStream = File.OpenRead("../ImageSharp.Tests/TestImages/Formats/Bmp/Car.bmp"); this.bmpCore = CoreImage.Load <Rgba32>(this.bmpStream); this.bmpStream.Position = 0; this.bmpDrawing = Image.FromStream(this.bmpStream); } }
public void ReadImage() { if (this.image == null) { using (FileStream stream = File.OpenRead("../ImageSharp.Tests/TestImages/Formats/Bmp/Car.bmp")) { this.image = CoreImage.Load <Rgba32>(stream); } } }
public void ReadImage() { if (this.image == null) { using (FileStream stream = File.OpenRead("/Users/pknopf/git/ImageSharp/tests/Images/Input/Bmp/Car.bmp")) { this.image = CoreImage.Load <Rgba32>(stream); } } }
public CoreSize JpegImageSharpPdfJs() { using (MemoryStream memoryStream = new MemoryStream(this.jpegBytes)) { using (Image <Rgba32> image = CoreImage.Load <Rgba32>(memoryStream, new PdfJsJpegDecoder())) { return(new CoreSize(image.Width, image.Height)); } } }
public CoreSize GifCore() { using (MemoryStream memoryStream = new MemoryStream(this.gifBytes)) { using (Image <Rgba32> image = CoreImage.Load <Rgba32>(memoryStream)) { return(new CoreSize(image.Width, image.Height)); } } }
public void ReadImages() { if (this.bmpStream == null) { this.bmpStream = File.OpenRead("/Users/pknopf/git/ImageSharp/tests/Images/Input/Bmp/Car.bmp"); this.bmpCore = CoreImage.Load <Rgba32>(this.bmpStream); this.bmpStream.Position = 0; //this.bmpDrawing = Image.FromStream(this.bmpStream); } }
public CoreSize PngCore() { using (var memoryStream = new MemoryStream(this.pngBytes)) { using (var image = CoreImage.Load <Rgba32>(memoryStream)) { return(new CoreSize(image.Width, image.Height)); } } }
public void ReadImages() { if (this.bmpStream == null) { const string TestImage = TestImages.Bmp.Car; this.bmpStream = File.OpenRead(Path.Combine(TestEnvironment.InputImagesDirectoryFullPath, TestImage)); this.bmpCore = CoreImage.Load <Rgba32>(this.bmpStream); this.bmpStream.Position = 0; this.bmpDrawing = Image.FromStream(this.bmpStream); } }
public void ReadImages() { if (this.bmpStream == null) { string path = this.LargeImage ? "../ImageSharp.Tests/TestImages/Formats/Jpg/baseline/jpeg420exif.jpg" : "../ImageSharp.Tests/TestImages/Formats/Bmp/Car.bmp"; this.bmpStream = File.OpenRead(path); this.bmpCore = CoreImage.Load <Rgba32>(this.bmpStream); this.bmpStream.Position = 0; } }
public void ReadImages() { if (this.bmpStream == null) { string path = Path.Combine( TestEnvironment.InputImagesDirectoryFullPath, this.LargeImage ? TestImages.Jpeg.Baseline.Jpeg420Exif : TestImages.Bmp.Car); this.bmpStream = File.OpenRead(path); this.bmpCore = CoreImage.Load <Rgba32>(this.bmpStream); this.bmpStream.Position = 0; this.bmpDrawing = Image.FromStream(this.bmpStream); } }
protected override void ReadFilesImpl() { base.ReadFilesImpl(); foreach (KeyValuePair <string, byte[]> kv in this.fileNamesToBytes) { byte[] bytes = kv.Value; string fn = kv.Key; using (var ms1 = new MemoryStream(bytes)) { this.fileNamesToImageSharpImages[fn] = CoreImage.Load <Rgba32>(ms1); } this.fileNamesToSystemDrawingImages[fn] = new Bitmap(new MemoryStream(bytes)); } }
public void DecodeJpegImageSharpNwq() { this.ForEachStream( ms => CoreImage.Load <Rgba32>(ms) ); }