public void ApplyImage_ShouldApplyPartOfImage() { var partOfImage = FluentImage.FromFile(IoHelper.ResolveUrl("Montanhas azuis.jpg")); partOfImage.Resize.Crop(new Rectangle(100, 0, 200, partOfImage.Current.Height)); this.image.Draw.ApplyImage(partOfImage); }
public void Constructor_CanCreateFluentImageByFilename() { // Arrange: var image = FluentImage.FromFile(IoHelper.ResolveUrl("Inverno.jpg")); // Act: var result = image.ToString(); // Assert: result.Should().Not.Be.Empty(); }
public void ToString_GetImageInBase64Format() { // Arrange: this.builder = FluentImage.FromFile(IoHelper.ResolveUrl("Inverno.jpg")); // Act: var result = this.builder.ToString(); // Assert: result.Should().Not.Be.Empty(); }
public void Save_ShouldSaveToStream() { var sourceImage = IoHelper.ResolveUrl("Inverno.jpg"); using (var fileStream = new FileStream(destImageStream, FileMode.Create)) { FluentImage.FromFile(sourceImage) .Save(fileStream, OutputFormat.Jpeg); } FluentImage.FromFile(sourceImage) .Save(destImageFile, OutputFormat.Jpeg); FileAssert.AreEqual(destImageStream, destImageFile); }
public Draw(FluentImage builder) { this.builder = builder; }
public void SetUp() { this.image = FluentImage.FromFile(IoHelper.ResolveUrl("Montanhas azuis.jpg")); }
public void SetUp() { this.builder = FluentImage.FromFile(IoHelper.ResolveUrl(this.resource.Key)); }
public Rotate(FluentImage builder) { this.builder = builder; }
public void SetUp() { this.fluentImage = FluentImage.FromFile(IoHelper.ResolveUrl("Pôr-do-sol.jpg")); }
internal Resize(FluentImage builder) { this.builder = builder; }
public Flip(FluentImage builder) { this.builder = builder; }
public FilterList(FluentImage builder) { this.builder = builder; this.Filters = new List<IFilter>(); }
public FilterList(FluentImage builder) { this.builder = builder; this.Filters = new List <IFilter>(); }
public void SetUp() { this.image = FluentImage.FromFile(IoHelper.ResolveUrl("Inverno.jpg")); }
public void SetUp() { this.builder = FluentImage.FromFile(IoHelper.ResolveUrl("Inverno.jpg")); }
public void ApplyImage_ShouldApplyImageInCenter() { var partOfImage = FluentImage.FromFile(IoHelper.ResolveUrl("Montanhas azuis.jpg")); this.image.Draw.ApplyImage(partOfImage, new Rectangle(Convert.ToInt32(this.image.Current.Width / 2), Convert.ToInt32(this.image.Current.Height / 2), 200, 200)); }
public void SetUp() { this.builder = FluentImage.FromFile(IoHelper.ResolveUrl("Ninféias.jpg")); }