Пример #1
0
        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);
        }
Пример #2
0
        public void Constructor_CanCreateFluentImageByFilename()
        {
            // Arrange:
            var image = FluentImage.FromFile(IoHelper.ResolveUrl("Inverno.jpg"));

            // Act:
            var result = image.ToString();

            // Assert:
            result.Should().Not.Be.Empty();
        }
Пример #3
0
        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();
        }
Пример #4
0
        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();
        }
Пример #5
0
        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);
        }
Пример #6
0
 public Draw(FluentImage builder)
 {
     this.builder = builder;
 }
Пример #7
0
 public void SetUp()
 {
     this.image = FluentImage.FromFile(IoHelper.ResolveUrl("Montanhas azuis.jpg"));
 }
Пример #8
0
 public void SetUp()
 {
     this.builder = FluentImage.FromFile(IoHelper.ResolveUrl(this.resource.Key));
 }
Пример #9
0
 public Rotate(FluentImage builder)
 {
     this.builder = builder;
 }
Пример #10
0
 public void SetUp()
 {
     this.fluentImage = FluentImage.FromFile(IoHelper.ResolveUrl("Pôr-do-sol.jpg"));
 }
Пример #11
0
 internal Resize(FluentImage builder)
 {
     this.builder = builder;
 }
Пример #12
0
 public void SetUp()
 {
     this.builder = FluentImage.FromFile(IoHelper.ResolveUrl(this.resource.Key));
 }
Пример #13
0
 internal Resize(FluentImage builder)
 {
     this.builder = builder;
 }
Пример #14
0
 public Rotate(FluentImage builder)
 {
     this.builder = builder;
 }
Пример #15
0
 public Draw(FluentImage builder)
 {
     this.builder = builder;
 }
Пример #16
0
 public void SetUp()
 {
     this.fluentImage = FluentImage.FromFile(IoHelper.ResolveUrl("Pôr-do-sol.jpg"));
 }
Пример #17
0
 public Flip(FluentImage builder)
 {
     this.builder = builder;
 }
Пример #18
0
 public FilterList(FluentImage builder)
 {
     this.builder = builder;
     this.Filters = new List<IFilter>();
 }
Пример #19
0
 public void SetUp()
 {
     this.image = FluentImage.FromFile(IoHelper.ResolveUrl("Montanhas azuis.jpg"));
 }
Пример #20
0
 public FilterList(FluentImage builder)
 {
     this.builder = builder;
     this.Filters = new List <IFilter>();
 }
Пример #21
0
 public void SetUp()
 {
     this.image = FluentImage.FromFile(IoHelper.ResolveUrl("Inverno.jpg"));
 }
Пример #22
0
 public void SetUp()
 {
     this.builder = FluentImage.FromFile(IoHelper.ResolveUrl("Inverno.jpg"));
 }
Пример #23
0
        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));
        }
Пример #24
0
 public void SetUp()
 {
     this.builder = FluentImage.FromFile(IoHelper.ResolveUrl("Ninféias.jpg"));
 }
Пример #25
0
 public Flip(FluentImage builder)
 {
     this.builder = builder;
 }