Closed bijington closed 3 years ago
When choosing WatermarkPosition.Top or WatermarkPosition.Bottom the banner has half chopped off.
WatermarkPosition.Top
WatermarkPosition.Bottom
Half the banner and text is chopped as it is outside of the bounds of the image.
The banner and text should render.
master
Based on unit test ImageResizerGeneratorFixture.AppliesTextBanner:
ImageResizerGeneratorFixture.AppliesTextBanner
var config = GetConfiguration(); config.IntermediateOutputPath += GetOutputDirectorySuffix((nameof(text), text), (nameof(scale), scale)); var generator = new ImageResizeGenerator(config); var image = new OutputImage { Height = 0, Width = 0, InputFile = Path.Combine(TestConstants.ImageDirectory, "dotnetbot.png"), OutputFile = Path.Combine(config.IntermediateOutputPath, "dotnetbot.png"), OutputLink = Path.Combine("Resources", "drawable-xxxhdpi", "dotnetbot.png"), RequiresBackgroundColor = true, Scale = scale, ShouldBeVisible = true, Watermark = new WatermarkConfiguration { Text = text, Position = WatermarkPosition.Top } }; generator.ProcessImage(image);
Fixed in PR #208
Description
When choosing
WatermarkPosition.Top
orWatermarkPosition.Bottom
the banner has half chopped off.Reproduction Steps
Half the banner and text is chopped as it is outside of the bounds of the image.
Expected Behavior
The banner and text should render.
Actual Behavior
Half the banner and text is chopped as it is outside of the bounds of the image.
Environment
master
commit: https://github.com/dansiegel/Mobile.BuildTools/commit/a49413a23a22bbc714522443055a460dd3e12f1fReproduction App
Based on unit test
ImageResizerGeneratorFixture.AppliesTextBanner
: