mirror of https://github.com/SixLabors/ImageSharp
26 changed files with 976 additions and 1010 deletions
@ -1,136 +0,0 @@ |
|||||
// --------------------------------------------------------------------------------------------------------------------
|
|
||||
// <copyright file="Constrain.cs" company="James South">
|
|
||||
// Copyright (c) James South.
|
|
||||
// Licensed under the Apache License, Version 2.0.
|
|
||||
// </copyright>
|
|
||||
// <summary>
|
|
||||
// Constrains an image to the given dimensions.
|
|
||||
// </summary>
|
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace ImageProcessor.Processors |
|
||||
{ |
|
||||
#region Using
|
|
||||
using System.Collections.Generic; |
|
||||
using System.Drawing; |
|
||||
using System.Text.RegularExpressions; |
|
||||
using ImageProcessor.Helpers.Extensions; |
|
||||
#endregion
|
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Constrains an image to the given dimensions.
|
|
||||
/// </summary>
|
|
||||
public class Constrain : ResizeBase |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// The regular expression to search strings for.
|
|
||||
/// </summary>
|
|
||||
private static readonly Regex QueryRegex = new Regex(@"constrain=\d+[,-]\d+", RegexOptions.Compiled); |
|
||||
|
|
||||
#region IGraphicsProcessor Members
|
|
||||
/// <summary>
|
|
||||
/// Gets the regular expression to search strings for.
|
|
||||
/// </summary>
|
|
||||
public override Regex RegexPattern |
|
||||
{ |
|
||||
get |
|
||||
{ |
|
||||
return QueryRegex; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets or sets DynamicParameter.
|
|
||||
/// </summary>
|
|
||||
public override dynamic DynamicParameter { get; set; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the order in which this processor is to be used in a chain.
|
|
||||
/// </summary>
|
|
||||
public override int SortOrder { get; protected set; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets or sets any additional settings required by the processor.
|
|
||||
/// </summary>
|
|
||||
public override Dictionary<string, string> Settings { get; set; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// The position in the original string where the first character of the captured substring was found.
|
|
||||
/// </summary>
|
|
||||
/// <param name="queryString">
|
|
||||
/// The query string to search.
|
|
||||
/// </param>
|
|
||||
/// <returns>
|
|
||||
/// The zero-based starting position in the original string where the captured substring was found.
|
|
||||
/// </returns>
|
|
||||
public override int MatchRegexIndex(string queryString) |
|
||||
{ |
|
||||
int index = 0; |
|
||||
|
|
||||
// Set the sort order to max to allow filtering.
|
|
||||
this.SortOrder = int.MaxValue; |
|
||||
|
|
||||
foreach (Match match in this.RegexPattern.Matches(queryString)) |
|
||||
{ |
|
||||
if (match.Success) |
|
||||
{ |
|
||||
if (index == 0) |
|
||||
{ |
|
||||
// Set the index on the first instance only.
|
|
||||
this.SortOrder = match.Index; |
|
||||
int[] constraints = match.Value.ToPositiveIntegerArray(); |
|
||||
|
|
||||
int x = constraints[0]; |
|
||||
int y = constraints[1]; |
|
||||
|
|
||||
this.DynamicParameter = new Size(x, y); |
|
||||
} |
|
||||
|
|
||||
index += 1; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return this.SortOrder; |
|
||||
} |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Processes the image.
|
|
||||
/// </summary>
|
|
||||
/// <param name="factory">
|
|
||||
/// The the current instance of the <see cref="T:ImageProcessor.ImageFactory"/> class containing
|
|
||||
/// the image to process.
|
|
||||
/// </param>
|
|
||||
/// <returns>
|
|
||||
/// The processed image from the current instance of the <see cref="T:ImageProcessor.ImageFactory"/> class.
|
|
||||
/// </returns>
|
|
||||
public override Image ProcessImage(ImageFactory factory) |
|
||||
{ |
|
||||
double constrainedWidth = this.DynamicParameter.Width; |
|
||||
double constrainedHeight = this.DynamicParameter.Height; |
|
||||
|
|
||||
Image original = factory.Image; |
|
||||
double width = original.Width; |
|
||||
double height = original.Height; |
|
||||
|
|
||||
if (width > constrainedWidth || height > constrainedHeight) |
|
||||
{ |
|
||||
double constraintRatio = constrainedHeight / constrainedWidth; |
|
||||
double originalRatio = height / width; |
|
||||
|
|
||||
Size newSize = originalRatio < constraintRatio |
|
||||
? new Size((int)constrainedWidth, 0) |
|
||||
: new Size(0, (int)constrainedHeight); |
|
||||
|
|
||||
int defaultMaxWidth; |
|
||||
int defaultMaxHeight; |
|
||||
int.TryParse(this.Settings["MaxWidth"], out defaultMaxWidth); |
|
||||
int.TryParse(this.Settings["MaxHeight"], out defaultMaxHeight); |
|
||||
|
|
||||
return this.ResizeImage(factory, newSize.Width, newSize.Height, defaultMaxWidth, defaultMaxHeight, Color.Transparent); |
|
||||
} |
|
||||
|
|
||||
return factory.Image; |
|
||||
} |
|
||||
#endregion
|
|
||||
} |
|
||||
} |
|
||||
@ -1,274 +0,0 @@ |
|||||
// --------------------------------------------------------------------------------------------------------------------
|
|
||||
// <copyright file="ResizeBase.cs" company="James South">
|
|
||||
// Copyright (c) James South.
|
|
||||
// Licensed under the Apache License, Version 2.0.
|
|
||||
// </copyright>
|
|
||||
// <summary>
|
|
||||
// The resize base for inheriting resizable methods from.
|
|
||||
// </summary>
|
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace ImageProcessor.Processors |
|
||||
{ |
|
||||
#region Using
|
|
||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Drawing; |
|
||||
using System.Drawing.Drawing2D; |
|
||||
using System.Drawing.Imaging; |
|
||||
using System.Text.RegularExpressions; |
|
||||
|
|
||||
using ImageProcessor.Imaging; |
|
||||
|
|
||||
#endregion
|
|
||||
|
|
||||
/// <summary>
|
|
||||
/// The resize base for inheriting resizable methods from.
|
|
||||
/// </summary>
|
|
||||
public abstract class ResizeBase : IGraphicsProcessor |
|
||||
{ |
|
||||
#region IGraphicsProcessor Members
|
|
||||
/// <summary>
|
|
||||
/// Gets the regular expression to search strings for.
|
|
||||
/// </summary>
|
|
||||
public abstract Regex RegexPattern { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets or sets DynamicParameter.
|
|
||||
/// </summary>
|
|
||||
public abstract dynamic DynamicParameter { get; set; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets or sets the order in which this processor is to be used in a chain.
|
|
||||
/// </summary>
|
|
||||
public abstract int SortOrder { get; protected set; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets or sets any additional settings required by the processor.
|
|
||||
/// </summary>
|
|
||||
public abstract Dictionary<string, string> Settings { get; set; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// The position in the original string where the first character of the captured substring was found.
|
|
||||
/// </summary>
|
|
||||
/// <param name="queryString">
|
|
||||
/// The query string to search.
|
|
||||
/// </param>
|
|
||||
/// <returns>
|
|
||||
/// The zero-based starting position in the original string where the captured substring was found.
|
|
||||
/// </returns>
|
|
||||
public abstract int MatchRegexIndex(string queryString); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Processes the image.
|
|
||||
/// </summary>
|
|
||||
/// <param name="factory">
|
|
||||
/// The the current instance of the <see cref="T:ImageProcessor.ImageFactory"/> class containing
|
|
||||
/// the image to process.
|
|
||||
/// </param>
|
|
||||
/// <returns>
|
|
||||
/// The processed image from the current instance of the <see cref="T:ImageProcessor.ImageFactory"/> class.
|
|
||||
/// </returns>
|
|
||||
public abstract Image ProcessImage(ImageFactory factory); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// The resize image.
|
|
||||
/// </summary>
|
|
||||
/// <param name="factory">
|
|
||||
/// The the current instance of the <see cref="T:ImageProcessor.ImageFactory"/> class containing
|
|
||||
/// the image to process.
|
|
||||
/// </param>
|
|
||||
/// <param name="width">
|
|
||||
/// The width to resize the image to.
|
|
||||
/// </param>
|
|
||||
/// <param name="height">
|
|
||||
/// The height to resize the image to.
|
|
||||
/// </param>
|
|
||||
/// <param name="defaultMaxWidth">
|
|
||||
/// The default max width to resize the image to.
|
|
||||
/// </param>
|
|
||||
/// <param name="defaultMaxHeight">
|
|
||||
/// The default max height to resize the image to.
|
|
||||
/// </param>
|
|
||||
/// <param name="backgroundColor">
|
|
||||
/// The background color to pad the image with.
|
|
||||
/// </param>
|
|
||||
/// <param name="resizeMode">
|
|
||||
/// The mode with which to resize the image.
|
|
||||
/// </param>
|
|
||||
/// <param name="anchorPosition">
|
|
||||
/// The anchor position to place the image at.
|
|
||||
/// </param>
|
|
||||
/// <returns>
|
|
||||
/// The processed image from the current instance of the <see cref="T:ImageProcessor.ImageFactory"/> class.
|
|
||||
/// </returns>
|
|
||||
protected Image ResizeImage( |
|
||||
ImageFactory factory, |
|
||||
int width, |
|
||||
int height, |
|
||||
int defaultMaxWidth, |
|
||||
int defaultMaxHeight, |
|
||||
Color backgroundColor, |
|
||||
ResizeMode resizeMode = ResizeMode.Pad, |
|
||||
AnchorPosition anchorPosition = AnchorPosition.Center) |
|
||||
{ |
|
||||
Bitmap newImage = null; |
|
||||
Image image = factory.Image; |
|
||||
|
|
||||
try |
|
||||
{ |
|
||||
int sourceWidth = image.Width; |
|
||||
int sourceHeight = image.Height; |
|
||||
|
|
||||
int destinationWidth = width; |
|
||||
int destinationHeight = height; |
|
||||
|
|
||||
int maxWidth = defaultMaxWidth > 0 ? defaultMaxWidth : int.MaxValue; |
|
||||
int maxHeight = defaultMaxHeight > 0 ? defaultMaxHeight : int.MaxValue; |
|
||||
|
|
||||
// Fractional variants for preserving aspect ratio.
|
|
||||
double percentHeight = Math.Abs(height / (double)sourceHeight); |
|
||||
double percentWidth = Math.Abs(width / (double)sourceWidth); |
|
||||
|
|
||||
int destinationX = 0; |
|
||||
int destinationY = 0; |
|
||||
|
|
||||
// Change the destination rectangle coordinates if padding and
|
|
||||
// there has been a set width and height.
|
|
||||
if (resizeMode == ResizeMode.Pad && width > 0 && height > 0) |
|
||||
{ |
|
||||
double ratio; |
|
||||
|
|
||||
if (percentHeight < percentWidth) |
|
||||
{ |
|
||||
ratio = percentHeight; |
|
||||
destinationX = (int)((width - (sourceWidth * ratio)) / 2); |
|
||||
destinationWidth = (int)Math.Floor(sourceWidth * percentHeight); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
ratio = percentWidth; |
|
||||
destinationY = (int)((height - (sourceHeight * ratio)) / 2); |
|
||||
destinationHeight = (int)Math.Floor(sourceHeight * percentWidth); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
// Change the destination rectangle coordinates if cropping and
|
|
||||
// there has been a set width and height.
|
|
||||
if (resizeMode == ResizeMode.Crop && width > 0 && height > 0) |
|
||||
{ |
|
||||
double ratio; |
|
||||
|
|
||||
if (percentHeight < percentWidth) |
|
||||
{ |
|
||||
ratio = percentWidth; |
|
||||
|
|
||||
switch (anchorPosition) |
|
||||
{ |
|
||||
case AnchorPosition.Top: |
|
||||
destinationY = 0; |
|
||||
break; |
|
||||
case AnchorPosition.Bottom: |
|
||||
destinationY = (int)(height - (sourceHeight * ratio)); |
|
||||
break; |
|
||||
default: |
|
||||
destinationY = (int)((height - (sourceHeight * ratio)) / 2); |
|
||||
break; |
|
||||
} |
|
||||
|
|
||||
destinationHeight = (int)Math.Floor(sourceHeight * percentWidth); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
ratio = percentHeight; |
|
||||
|
|
||||
switch (anchorPosition) |
|
||||
{ |
|
||||
case AnchorPosition.Left: |
|
||||
destinationX = 0; |
|
||||
break; |
|
||||
case AnchorPosition.Right: |
|
||||
destinationX = (int)(width - (sourceWidth * ratio)); |
|
||||
break; |
|
||||
default: |
|
||||
destinationX = (int)((width - (sourceWidth * ratio)) / 2); |
|
||||
break; |
|
||||
} |
|
||||
|
|
||||
destinationWidth = (int)Math.Floor(sourceWidth * percentHeight); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
// If height or width is not passed we assume that the standard ratio is to be kept.
|
|
||||
if (height == 0) |
|
||||
{ |
|
||||
destinationHeight = (int)Math.Floor(sourceHeight * percentWidth); |
|
||||
height = destinationHeight; |
|
||||
} |
|
||||
|
|
||||
if (width == 0) |
|
||||
{ |
|
||||
destinationWidth = (int)Math.Floor(sourceWidth * percentHeight); |
|
||||
width = destinationWidth; |
|
||||
} |
|
||||
|
|
||||
if (width > 0 && height > 0 && width <= maxWidth && height <= maxHeight) |
|
||||
{ |
|
||||
// Don't use an object initializer here.
|
|
||||
// ReSharper disable once UseObjectOrCollectionInitializer
|
|
||||
newImage = new Bitmap(width, height, PixelFormat.Format32bppPArgb); |
|
||||
newImage.Tag = image.Tag; |
|
||||
|
|
||||
using (Graphics graphics = Graphics.FromImage(newImage)) |
|
||||
{ |
|
||||
// We want to use two different blending algorithms for enlargement/shrinking.
|
|
||||
// Bicubic is better enlarging for whilst Bilinear is better for shrinking.
|
|
||||
// http://www.codinghorror.com/blog/2007/07/better-image-resizing.html
|
|
||||
if (image.Width < destinationWidth && image.Height < destinationHeight) |
|
||||
{ |
|
||||
// We are making it larger.
|
|
||||
graphics.SmoothingMode = SmoothingMode.AntiAlias; |
|
||||
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; |
|
||||
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; |
|
||||
graphics.CompositingQuality = CompositingQuality.HighQuality; |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
// We are making it smaller.
|
|
||||
graphics.SmoothingMode = SmoothingMode.None; |
|
||||
graphics.InterpolationMode = InterpolationMode.HighQualityBilinear; |
|
||||
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; |
|
||||
graphics.CompositingQuality = CompositingQuality.HighQuality; |
|
||||
} |
|
||||
|
|
||||
// An unwanted border appears when using InterpolationMode.HighQualityBicubic to resize the image
|
|
||||
// as the algorithm appears to be pulling averaging detail from surFlooring pixels beyond the edge
|
|
||||
// of the image. Using the ImageAttributes class to specify that the pixels beyond are simply mirror
|
|
||||
// images of the pixels within solves this problem.
|
|
||||
using (ImageAttributes wrapMode = new ImageAttributes()) |
|
||||
{ |
|
||||
wrapMode.SetWrapMode(WrapMode.TileFlipXY); |
|
||||
graphics.Clear(backgroundColor); |
|
||||
Rectangle destRect = new Rectangle(destinationX, destinationY, destinationWidth, destinationHeight); |
|
||||
graphics.DrawImage(image, destRect, 0, 0, sourceWidth, sourceHeight, GraphicsUnit.Pixel, wrapMode); |
|
||||
} |
|
||||
|
|
||||
// Reassign the image.
|
|
||||
image.Dispose(); |
|
||||
image = newImage; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
catch |
|
||||
{ |
|
||||
if (newImage != null) |
|
||||
{ |
|
||||
newImage.Dispose(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return image; |
|
||||
} |
|
||||
#endregion
|
|
||||
} |
|
||||
} |
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@ |
|||||
|
e0fbb23ec0c6b4a6980ac29f0c71b82ff900eebc |
||||
@ -0,0 +1,100 @@ |
|||||
|
@{ |
||||
|
ViewBag.Title = "Bmp"; |
||||
|
} |
||||
|
|
||||
|
<article> |
||||
|
<h1>Bmp</h1> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Resized</h2> |
||||
|
<img src="/images/Penguins.bmp?width=300" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Cropped </h2> |
||||
|
<img src="/images/Penguins.bmp?crop=0-0-300-225" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<h2>Filter</h2> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>blackwhite</h3> |
||||
|
<img src="/images/Penguins.bmp?width=300&filter=blackwhite" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>comic</h3> |
||||
|
<img src="/images/Penguins.bmp?width=300&filter=comic" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>lomograph</h3> |
||||
|
<img src="/images/Penguins.bmp?width=300&filter=lomograph" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>greyscale</h3> |
||||
|
<img src="/images/Penguins.bmp?width=300&filter=greyscale" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>polaroid</h3> |
||||
|
<img src="/images/Penguins.bmp?width=300&filter=polaroid" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>sepia</h3> |
||||
|
<img src="/images/Penguins.bmp?width=300&filter=sepia" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>gotham</h3> |
||||
|
<img src="/images/Penguins.bmp?width=300&filter=gotham" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>hisatch</h3> |
||||
|
<img src="/images/Penguins.bmp?width=300&filter=hisatch" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>losatch</h3> |
||||
|
<img src="/images/Penguins.bmp?width=300&filter=losatch" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Watermark</h2> |
||||
|
<img src="/images/Penguins.bmp?width=300&watermark=text-test|color-fff|size-48|style-italic|opacity-100|position-100-100|shadow-true|font-arial" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Format</h2> |
||||
|
<img src="/images/Penguins.bmp?width=300&format=jpg" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Rotate</h2> |
||||
|
<img src="/images/Penguins.bmp?width=300&rotate=angle-54|bgcolor-fff" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Quality</h2> |
||||
|
<img src="/images/Penguins.bmp?width=300&quality=5" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Alpha</h2> |
||||
|
<img src="/images/Penguins.bmp?width=300&alpha=50" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
</article> |
||||
@ -0,0 +1,14 @@ |
|||||
|
@{ |
||||
|
ViewBag.Title = "External"; |
||||
|
} |
||||
|
<h1>External</h1> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<img src="/remote.axd?http://images.mymovies.net/images/film/cin/500x377/fid11707.jpg?width=400" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<img src="/remote.axd?http://maps.googleapis.com/maps/api/staticmap?center=Albany,+NY&zoom=13&scale=false&size=800x500&maptype=roadmap&sensor=false&format=png&visual_refresh=true?width=400" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
@ -0,0 +1,99 @@ |
|||||
|
@{ |
||||
|
ViewBag.Title = "Gif"; |
||||
|
} |
||||
|
<article> |
||||
|
<h1>Gif</h1> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Resized</h2> |
||||
|
<img src="/images/Penguins.gif?width=300" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Cropped </h2> |
||||
|
<img src="/images/Penguins.gif?crop=0-0-300-225" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<h2>Filter</h2> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>blackwhite</h3> |
||||
|
<img src="/images/Penguins.gif?width=300&filter=blackwhite" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>comic</h3> |
||||
|
<img src="/images/Penguins.gif?width=300&filter=comic" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>lomograph</h3> |
||||
|
<img src="/images/Penguins.gif?width=300&filter=lomograph" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>greyscale</h3> |
||||
|
<img src="/images/Penguins.gif?width=300&filter=greyscale" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>polaroid</h3> |
||||
|
<img src="/images/Penguins.gif?width=300&filter=polaroid" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>sepia</h3> |
||||
|
<img src="/images/Penguins.gif?width=300&filter=sepia" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>gotham</h3> |
||||
|
<img src="/images/Penguins.gif?width=300&filter=gotham" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>hisatch</h3> |
||||
|
<img src="/images/Penguins.gif?width=300&filter=hisatch" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>losatch</h3> |
||||
|
<img src="/images/Penguins.gif?width=300&filter=losatch" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Watermark</h2> |
||||
|
<img src="/images/Penguins.gif?width=300&watermark=text-test|color-fff|size-48|style-italic|opacity-100|position-100-100|shadow-true|font-arial" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Format</h2> |
||||
|
<img src="/images/Penguins.gif?width=300&format=png" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Rotate</h2> |
||||
|
<img src="/images/Penguins.gif?width=300&rotate=angle-54|bgcolor-fff" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Quality</h2> |
||||
|
<img src="/images/Penguins.gif?width=300&quality=5" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Alpha</h2> |
||||
|
<img src="/images/Penguins.gif?width=300&alpha=50" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
</article> |
||||
@ -0,0 +1,99 @@ |
|||||
|
@{ |
||||
|
ViewBag.Title = "Png"; |
||||
|
} |
||||
|
<article> |
||||
|
<h1>Png</h1> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Resized</h2> |
||||
|
<img src="/images/Penguins.png?width=300" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Cropped </h2> |
||||
|
<img src="/images/Penguins.png?crop=0-0-300-225" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<h2>Filter</h2> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>blackwhite</h3> |
||||
|
<img src="/images/Penguins.png?width=300&filter=blackwhite" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>comic</h3> |
||||
|
<img src="/images/Penguins.png?width=300&filter=comic" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>lomograph</h3> |
||||
|
<img src="/images/Penguins.png?width=300&filter=lomograph" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>greyscale</h3> |
||||
|
<img src="/images/Penguins.png?width=300&filter=greyscale" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>polaroid</h3> |
||||
|
<img src="/images/Penguins.png?width=300&filter=polaroid" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>sepia</h3> |
||||
|
<img src="/images/Penguins.png?width=300&filter=sepia" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>gotham</h3> |
||||
|
<img src="/images/Penguins.png?width=300&filter=gotham" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>hisatch</h3> |
||||
|
<img src="/images/Penguins.png?width=300&filter=hisatch" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>losatch</h3> |
||||
|
<img src="/images/Penguins.png?width=300&filter=losatch" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Watermark</h2> |
||||
|
<img src="/images/Penguins.png?width=300&watermark=text-test|color-fff|size-48|style-italic|opacity-100|position-100-100|shadow-true|font-arial" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Format</h2> |
||||
|
<img src="/images/Penguins.png?width=300&format=bmp" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Rotate</h2> |
||||
|
<img src="/images/Penguins.png?width=300&rotate=angle-54|bgcolor-fff" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Quality</h2> |
||||
|
<img src="/images/Penguins.png?width=300&quality=5" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Alpha</h2> |
||||
|
<img src="/images/Penguins.png?width=300&alpha=50" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
</article> |
||||
@ -0,0 +1,100 @@ |
|||||
|
@{ |
||||
|
ViewBag.Title = "Png8"; |
||||
|
} |
||||
|
|
||||
|
<article> |
||||
|
<h1>Png8</h1> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Resized</h2> |
||||
|
<img src="/images/Penguins-8.png?width=300" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Cropped </h2> |
||||
|
<img src="/images/Penguins-8.png?crop=0-0-300-225" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<h2>Filter</h2> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>blackwhite</h3> |
||||
|
<img src="/images/Penguins-8.png?width=300&filter=blackwhite" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>comic</h3> |
||||
|
<img src="/images/Penguins-8.png?width=300&filter=comic" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>lomograph</h3> |
||||
|
<img src="/images/Penguins-8.png?width=300&filter=lomograph" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>greyscale</h3> |
||||
|
<img src="/images/Penguins-8.png?width=300&filter=greyscale" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>polaroid</h3> |
||||
|
<img src="/images/Penguins-8.png?width=300&filter=polaroid" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>sepia</h3> |
||||
|
<img src="/images/Penguins-8.png?width=300&filter=sepia" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>gotham</h3> |
||||
|
<img src="/images/Penguins-8.png?width=300&filter=gotham" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>hisatch</h3> |
||||
|
<img src="/images/Penguins-8.png?width=300&filter=hisatch" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>losatch</h3> |
||||
|
<img src="/images/Penguins-8.png?width=300&filter=losatch" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Watermark</h2> |
||||
|
<img src="/images/Penguins-8.png?width=300&watermark=text-test|color-fff|size-48|style-italic|opacity-100|position-100-100|shadow-true|font-arial" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Format</h2> |
||||
|
<img src="/images/Penguins-8.png?width=300&format=bmp" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Rotate</h2> |
||||
|
<img src="/images/Penguins-8.png?width=300&rotate=angle-54|bgcolor-fff" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Quality</h2> |
||||
|
<img src="/images/Penguins-8.png?width=300&quality=5" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Alpha</h2> |
||||
|
<img src="/images/Penguins-8.png?width=300&alpha=50" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
</article> |
||||
@ -0,0 +1,99 @@ |
|||||
|
@{ |
||||
|
ViewBag.Title = "Tiff"; |
||||
|
} |
||||
|
<article> |
||||
|
<h1>Tiff</h1> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Resized</h2> |
||||
|
<img src="/images/Penguins.tif?width=300" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Cropped </h2> |
||||
|
<img src="/images/Penguins.tif?crop=0-0-300-225" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<h2>Filter</h2> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>blackwhite</h3> |
||||
|
<img src="/images/Penguins.tif?width=300&filter=blackwhite" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>comic</h3> |
||||
|
<img src="/images/Penguins.tif?width=300&filter=comic" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>lomograph</h3> |
||||
|
<img src="/images/Penguins.tif?width=300&filter=lomograph" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>greyscale</h3> |
||||
|
<img src="/images/Penguins.tif?width=300&filter=greyscale" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>polaroid</h3> |
||||
|
<img src="/images/Penguins.tif?width=300&filter=polaroid" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>sepia</h3> |
||||
|
<img src="/images/Penguins.tif?width=300&filter=sepia" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>gotham</h3> |
||||
|
<img src="/images/Penguins.tif?width=300&filter=gotham" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>hisatch</h3> |
||||
|
<img src="/images/Penguins.tif?width=300&filter=hisatch" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h3>losatch</h3> |
||||
|
<img src="/images/Penguins.tif?width=300&filter=losatch" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Watermark</h2> |
||||
|
<img src="/images/Penguins.tif?width=300&watermark=text-test|color-fff|size-48|style-italic|opacity-100|position-100-100|shadow-true|font-arial" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Format</h2> |
||||
|
<img src="/images/Penguins.tif?width=300&format=bmp" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Rotate</h2> |
||||
|
<img src="/images/Penguins.tif?width=300&rotate=angle-54|bgcolor-fff" /> |
||||
|
</div> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Quality</h2> |
||||
|
<img src="/images/Penguins.tif?width=300&quality=5" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<section> |
||||
|
<div class="row"> |
||||
|
<div class="col-s-6"> |
||||
|
<h2>Alpha</h2> |
||||
|
<img src="/images/Penguins.tif?width=300&alpha=50" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
</article> |
||||
@ -1,18 +1,17 @@ |
|||||
<?xml version="1.0" encoding="utf-8" ?> |
<?xml version="1.0" encoding="utf-8" ?> |
||||
<processing> |
<processing> |
||||
<plugins> |
<plugins> |
||||
<plugin name="Resize"> |
<plugin name="Resize"> |
||||
<settings> |
<settings> |
||||
<setting key="MaxWidth" value="3000"/> |
<setting key="MaxWidth" value="3000"/> |
||||
<setting key="MaxHeight" value="3000"/> |
<setting key="MaxHeight" value="3000"/> |
||||
</settings> |
</settings> |
||||
</plugin> |
</plugin> |
||||
<plugin name="Constrain"> |
<plugin name="Preset"> |
||||
<settings> |
<settings> |
||||
<setting key="MaxWidth" value="3000"/> |
<setting key="a" value="width=300&height=150"/> |
||||
<setting key="MaxHeight" value="3000"/> |
</settings> |
||||
</settings> |
</plugin> |
||||
</plugin> |
</plugins> |
||||
</plugins> |
</processing> |
||||
</processing> |
|
||||
|
|
||||
|
|||||
Loading…
Reference in new issue