diff --git a/src/ImageProcessor.Web/Caching/DiskCache.cs b/src/ImageProcessor.Web/Caching/DiskCache.cs index 7930623ee9..19e3e54663 100644 --- a/src/ImageProcessor.Web/Caching/DiskCache.cs +++ b/src/ImageProcessor.Web/Caching/DiskCache.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor.Web/Config/ImageCacheSection.cs b/src/ImageProcessor.Web/Config/ImageCacheSection.cs index 51a5831f4b..ecb42ed5d0 100644 --- a/src/ImageProcessor.Web/Config/ImageCacheSection.cs +++ b/src/ImageProcessor.Web/Config/ImageCacheSection.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- @@ -41,9 +42,9 @@ namespace ImageProcessor.Web.Config /// Gets or sets the maximum number of days to store an image in the cache. /// /// The maximum number of days to store an image in the cache. - /// Defaults to 7 if not set. Maximum of 28. - [ConfigurationProperty("maxDays", DefaultValue = "7", IsRequired = false)] - [IntegerValidator(ExcludeRange = false, MaxValue = 28, MinValue = 0)] + /// Defaults to 28 if not set. + [ConfigurationProperty("maxDays", DefaultValue = "28", IsRequired = false)] + [IntegerValidator(ExcludeRange = false, MinValue = 0)] public int MaxDays { get diff --git a/src/ImageProcessor.Web/Config/ImageProcessingSection.cs b/src/ImageProcessor.Web/Config/ImageProcessingSection.cs index 9751e3ddf9..3d55cc9ba6 100644 --- a/src/ImageProcessor.Web/Config/ImageProcessingSection.cs +++ b/src/ImageProcessor.Web/Config/ImageProcessingSection.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor.Web/Config/ImageProcessorConfig.cs b/src/ImageProcessor.Web/Config/ImageProcessorConfig.cs index a47ae8de50..0e08e3e41a 100644 --- a/src/ImageProcessor.Web/Config/ImageProcessorConfig.cs +++ b/src/ImageProcessor.Web/Config/ImageProcessorConfig.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor.Web/Config/ImageSecuritySection.cs b/src/ImageProcessor.Web/Config/ImageSecuritySection.cs index 0e17cc7a5a..aefb90779d 100644 --- a/src/ImageProcessor.Web/Config/ImageSecuritySection.cs +++ b/src/ImageProcessor.Web/Config/ImageSecuritySection.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor.Web/Helpers/FileCompareLastwritetime.cs b/src/ImageProcessor.Web/Helpers/FileCompareLastwritetime.cs index 3fc315b5e4..c91a031a0d 100644 --- a/src/ImageProcessor.Web/Helpers/FileCompareLastwritetime.cs +++ b/src/ImageProcessor.Web/Helpers/FileCompareLastwritetime.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor.Web/Helpers/RemoteFile.cs b/src/ImageProcessor.Web/Helpers/RemoteFile.cs index af637b7ee7..4e96faa587 100644 --- a/src/ImageProcessor.Web/Helpers/RemoteFile.cs +++ b/src/ImageProcessor.Web/Helpers/RemoteFile.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs b/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs index d44596f65a..a7f6f3ceed 100644 --- a/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs +++ b/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- @@ -20,7 +21,7 @@ namespace ImageProcessor.Web.HttpModules #endregion /// - /// TODO: Update summary. + /// Processes any image requests within the web application. /// public class ImageProcessingModule : IHttpModule { @@ -121,7 +122,7 @@ namespace ImageProcessor.Web.HttpModules isFirstRun = false; } - // ImageFactory.Instance.Load(fullPath).AutoProcess().Save(cachedPath); + // Process the image. using (ImageFactory imageFactory = new ImageFactory()) { if (isRemote) diff --git a/src/ImageProcessor.Web/ImageFactoryExtensions.cs b/src/ImageProcessor.Web/ImageFactoryExtensions.cs index 396a60a7fc..7880944dd1 100644 --- a/src/ImageProcessor.Web/ImageFactoryExtensions.cs +++ b/src/ImageProcessor.Web/ImageFactoryExtensions.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor.Web/Properties/AssemblyInfo.cs b/src/ImageProcessor.Web/Properties/AssemblyInfo.cs index b7a2f9eed7..3ecc7da4c7 100644 --- a/src/ImageProcessor.Web/Properties/AssemblyInfo.cs +++ b/src/ImageProcessor.Web/Properties/AssemblyInfo.cs @@ -6,11 +6,11 @@ using System.Runtime.InteropServices; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ImageProcessor.Web")] -[assembly: AssemblyDescription("A library for on-the-fly processing of image files with .NET written in C#")] +[assembly: AssemblyDescription("A library for on-the-fly processing of image files with ASP.NET written in C#")] [assembly: AssemblyConfiguration("James South")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("James South")] [assembly: AssemblyProduct("ImageProcessor.Web")] -[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyCopyright("Copyright ©")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.1.0.1")] -[assembly: AssemblyFileVersion("1.1.0.1")] +[assembly: AssemblyVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.2.0.0")] diff --git a/src/ImageProcessor/ImageFactory.cs b/src/ImageProcessor/ImageFactory.cs index 69fd0fc91c..edbd7fef86 100644 --- a/src/ImageProcessor/ImageFactory.cs +++ b/src/ImageProcessor/ImageFactory.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Filters/BlackWhiteMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/BlackWhiteMatrixFilter.cs index 1856422b36..4b1d796b9a 100644 --- a/src/ImageProcessor/Imaging/Filters/BlackWhiteMatrixFilter.cs +++ b/src/ImageProcessor/Imaging/Filters/BlackWhiteMatrixFilter.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Filters/ColorMatrixes.cs b/src/ImageProcessor/Imaging/Filters/ColorMatrixes.cs index 363bae4999..59b1660e99 100644 --- a/src/ImageProcessor/Imaging/Filters/ColorMatrixes.cs +++ b/src/ImageProcessor/Imaging/Filters/ColorMatrixes.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Filters/ComicMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/ComicMatrixFilter.cs index 075e3748de..8b3463f911 100644 --- a/src/ImageProcessor/Imaging/Filters/ComicMatrixFilter.cs +++ b/src/ImageProcessor/Imaging/Filters/ComicMatrixFilter.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Filters/GothamMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/GothamMatrixFilter.cs index d41bad3331..4027771195 100644 --- a/src/ImageProcessor/Imaging/Filters/GothamMatrixFilter.cs +++ b/src/ImageProcessor/Imaging/Filters/GothamMatrixFilter.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs index ade0cfccae..0a31f5137d 100644 --- a/src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs +++ b/src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Filters/HiSatchMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/HiSatchMatrixFilter.cs index 33cbddcdb9..eddf5fc4d7 100644 --- a/src/ImageProcessor/Imaging/Filters/HiSatchMatrixFilter.cs +++ b/src/ImageProcessor/Imaging/Filters/HiSatchMatrixFilter.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Filters/IMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/IMatrixFilter.cs index 39581ba2d5..8036628ef8 100644 --- a/src/ImageProcessor/Imaging/Filters/IMatrixFilter.cs +++ b/src/ImageProcessor/Imaging/Filters/IMatrixFilter.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Filters/InvertMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/InvertMatrixFilter.cs index 0d009f177d..5a886ca7fa 100644 --- a/src/ImageProcessor/Imaging/Filters/InvertMatrixFilter.cs +++ b/src/ImageProcessor/Imaging/Filters/InvertMatrixFilter.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Filters/LoSatchMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/LoSatchMatrixFilter.cs index 91d8fb66ba..8f87f08094 100644 --- a/src/ImageProcessor/Imaging/Filters/LoSatchMatrixFilter.cs +++ b/src/ImageProcessor/Imaging/Filters/LoSatchMatrixFilter.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Filters/LomographMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/LomographMatrixFilter.cs index f193e03c9b..337968337a 100644 --- a/src/ImageProcessor/Imaging/Filters/LomographMatrixFilter.cs +++ b/src/ImageProcessor/Imaging/Filters/LomographMatrixFilter.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Filters/PolaroidMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/PolaroidMatrixFilter.cs index d81de098c7..25b53b235d 100644 --- a/src/ImageProcessor/Imaging/Filters/PolaroidMatrixFilter.cs +++ b/src/ImageProcessor/Imaging/Filters/PolaroidMatrixFilter.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Filters/SepiaMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/SepiaMatrixFilter.cs index 24051140e0..b9cfd65b06 100644 --- a/src/ImageProcessor/Imaging/Filters/SepiaMatrixFilter.cs +++ b/src/ImageProcessor/Imaging/Filters/SepiaMatrixFilter.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/ImageUtils.cs b/src/ImageProcessor/Imaging/ImageUtils.cs index ee6ec75cc5..54be05feb9 100644 --- a/src/ImageProcessor/Imaging/ImageUtils.cs +++ b/src/ImageProcessor/Imaging/ImageUtils.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/OctreeQuantizer.cs b/src/ImageProcessor/Imaging/OctreeQuantizer.cs index 3cdd17bf08..ac0929c055 100644 --- a/src/ImageProcessor/Imaging/OctreeQuantizer.cs +++ b/src/ImageProcessor/Imaging/OctreeQuantizer.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/Quantizer.cs b/src/ImageProcessor/Imaging/Quantizer.cs index 97fda4b902..29933f3216 100644 --- a/src/ImageProcessor/Imaging/Quantizer.cs +++ b/src/ImageProcessor/Imaging/Quantizer.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/ResponseType.cs b/src/ImageProcessor/Imaging/ResponseType.cs index 7ae3748b59..8b5aa0ea83 100644 --- a/src/ImageProcessor/Imaging/ResponseType.cs +++ b/src/ImageProcessor/Imaging/ResponseType.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/RotateLayer.cs b/src/ImageProcessor/Imaging/RotateLayer.cs index 80cc521682..cbe23ffdfc 100644 --- a/src/ImageProcessor/Imaging/RotateLayer.cs +++ b/src/ImageProcessor/Imaging/RotateLayer.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Imaging/TextLayer.cs b/src/ImageProcessor/Imaging/TextLayer.cs index 6b24c6c328..a317fbef60 100644 --- a/src/ImageProcessor/Imaging/TextLayer.cs +++ b/src/ImageProcessor/Imaging/TextLayer.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Processors/Alpha.cs b/src/ImageProcessor/Processors/Alpha.cs index c6f76bc91e..203e2c918b 100644 --- a/src/ImageProcessor/Processors/Alpha.cs +++ b/src/ImageProcessor/Processors/Alpha.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- @@ -23,7 +24,7 @@ namespace ImageProcessor.Processors /// The regular expression to search strings for. /// http://stackoverflow.com/a/6400969/427899 /// - private static readonly Regex QueryRegex = new Regex(@"alpha=\d{1,2}(?!\d)|alpha=100", RegexOptions.Compiled); + private static readonly Regex QueryRegex = new Regex(@"alpha=(?:100|[1-9]?[0-9])", RegexOptions.Compiled); #region IGraphicsProcessor Members /// diff --git a/src/ImageProcessor/Processors/Crop.cs b/src/ImageProcessor/Processors/Crop.cs index 6e9dd13599..b90f5d33a4 100644 --- a/src/ImageProcessor/Processors/Crop.cs +++ b/src/ImageProcessor/Processors/Crop.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Processors/Filter.cs b/src/ImageProcessor/Processors/Filter.cs index bad5e75521..fa92095fba 100644 --- a/src/ImageProcessor/Processors/Filter.cs +++ b/src/ImageProcessor/Processors/Filter.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Processors/Format.cs b/src/ImageProcessor/Processors/Format.cs index f0725d86f6..d85b89d798 100644 --- a/src/ImageProcessor/Processors/Format.cs +++ b/src/ImageProcessor/Processors/Format.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Processors/IGraphicsProcessor.cs b/src/ImageProcessor/Processors/IGraphicsProcessor.cs index 672bea4fff..3b6cee346c 100644 --- a/src/ImageProcessor/Processors/IGraphicsProcessor.cs +++ b/src/ImageProcessor/Processors/IGraphicsProcessor.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Processors/Quality.cs b/src/ImageProcessor/Processors/Quality.cs index 2e4dfb66f4..253e6f606c 100644 --- a/src/ImageProcessor/Processors/Quality.cs +++ b/src/ImageProcessor/Processors/Quality.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- @@ -21,7 +22,7 @@ namespace ImageProcessor.Processors /// /// The regular expression to search strings for. /// - private static readonly Regex QueryRegex = new Regex(@"quality=\d{1,2}(?!\d)|quality=100", RegexOptions.Compiled); + private static readonly Regex QueryRegex = new Regex(@"quality=(?:100|[1-9]?[0-9])", RegexOptions.Compiled); #region IGraphicsProcessor Members /// diff --git a/src/ImageProcessor/Processors/Resize.cs b/src/ImageProcessor/Processors/Resize.cs index f99e9a7204..036342e084 100644 --- a/src/ImageProcessor/Processors/Resize.cs +++ b/src/ImageProcessor/Processors/Resize.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- @@ -24,7 +25,7 @@ namespace ImageProcessor.Processors /// /// The regular expression to search strings for. /// - private static readonly Regex QueryRegex = new Regex(@"(resize=width-\d+\|height-\d+|width=\d+\&height=\d+|height=\d+\&width=\d+|(width|height)=\d+)", RegexOptions.Compiled); + private static readonly Regex QueryRegex = new Regex(@"(width|height)=\d+", RegexOptions.Compiled); #region IGraphicsProcessor Members /// @@ -113,48 +114,17 @@ namespace ImageProcessor.Processors // Set the index on the first instance only. this.SortOrder = match.Index; } - - // Resize syntax - if (match.Value.Contains("resize")) + + // Match syntax + if (match.Value.Contains("width")) { - int[] values = match.Value.ToIntegerArray(); - - size.Width = values[0]; - size.Height = values[1]; - } - else if (match.Value.Contains("width") && match.Value.Contains("height")) - { - // Combined width/height syntax - int widthPosition = match.Value.IndexOf("width"); - int heightPosition = match.Value.IndexOf("height"); - - int[] values = match.Value.ToIntegerArray(); - - if (widthPosition < heightPosition) - { - size.Width = values[0]; - size.Height = values[1]; - - } - else - { - size.Width = values[1]; - size.Height = values[0]; - } + size.Width = match.Value.ToIntegerArray()[0]; } else { - // Inividual syntax - if (match.Value.Contains("width")) - { - size.Width = match.Value.ToIntegerArray()[0]; - } - else - { - size.Height = match.Value.ToIntegerArray()[0]; - } + size.Height = match.Value.ToIntegerArray()[0]; } - + index += 1; } } diff --git a/src/ImageProcessor/Processors/Rotate.cs b/src/ImageProcessor/Processors/Rotate.cs index adb9923231..4b5bb3290f 100644 --- a/src/ImageProcessor/Processors/Rotate.cs +++ b/src/ImageProcessor/Processors/Rotate.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- @@ -23,12 +24,12 @@ namespace ImageProcessor.Processors /// /// The regular expression to search strings for. /// - private static readonly Regex QueryRegex = new Regex(@"rotate=([1-2][0-9][0-9]|3[0-5][0-9]|\d{1}(?!\d)|\d{1,2}(?!\d)|360)|rotate=[^&]*", RegexOptions.Compiled); + private static readonly Regex QueryRegex = new Regex(@"rotate=((?:3[0-5][0-9]|[12][0-9]{2}|[1-9][0-9]?)|angle-(?:3[0-5][0-9]|[12][0-9]{2}|[1-9][0-9]?)\|bgcolor=([0-9a-fA-F]{3}){1,2})", RegexOptions.Compiled); /// /// The regular expression to search strings for the angle attribute. /// - private static readonly Regex AngleRegex = new Regex(@"rotate=angle-([1-2][0-9][0-9]|3[0-5][0-9]|\d{1}(?!\d)|\d{1,2}(?!\d)|360)", RegexOptions.Compiled); + private static readonly Regex AngleRegex = new Regex(@"angle-(?:3[0-5][0-9]|[12][0-9]{2}|[1-9][0-9]?)", RegexOptions.Compiled); /// /// The regular expression to search strings for the color attribute. diff --git a/src/ImageProcessor/Processors/Vignette.cs b/src/ImageProcessor/Processors/Vignette.cs index 0fc7f7fe32..fcca3ecb89 100644 --- a/src/ImageProcessor/Processors/Vignette.cs +++ b/src/ImageProcessor/Processors/Vignette.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor/Processors/Watermark.cs b/src/ImageProcessor/Processors/Watermark.cs index 8046545eef..e324c70ddc 100644 --- a/src/ImageProcessor/Processors/Watermark.cs +++ b/src/ImageProcessor/Processors/Watermark.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Copyright (c) James South. +// Dual licensed under the MIT or GPL Version 2 licenses. // // ----------------------------------------------------------------------- @@ -23,50 +24,50 @@ namespace ImageProcessor.Processors /// public class Watermark : IGraphicsProcessor { - /// - /// The regular expression to search strings for. - /// - private static readonly Regex QueryRegex = new Regex(@"watermark=[^&]*", RegexOptions.Compiled); - - /// - /// The regular expression to search strings for the text attribute. - /// - private static readonly Regex TextRegex = new Regex(@"text-[^/:?#\[\]@!$&'()*%\|,;=]+", RegexOptions.Compiled); - - /// - /// The regular expression to search strings for the position attribute. - /// - private static readonly Regex PositionRegex = new Regex(@"position-\d+-\d+", RegexOptions.Compiled); - - /// - /// The regular expression to search strings for the color attribute. - /// - private static readonly Regex ColorRegex = new Regex(@"color-([0-9a-fA-F]{3}){1,2}", RegexOptions.Compiled); - - /// - /// The regular expression to search strings for the fontsize attribute. - /// - private static readonly Regex FontSizeRegex = new Regex(@"size-\d{1,3}", RegexOptions.Compiled); - - /// - /// The regular expression to search strings for the fontstyle attribute. - /// - private static readonly Regex FontStyleRegex = new Regex(@"style-(bold|italic|regular|strikeout|underline)", RegexOptions.Compiled); - - /// - /// The regular expression to search strings for the font family attribute. - /// - private static readonly Regex FontFamilyRegex = new Regex(@"font-[^/:?#\[\]@!$&'()*%\|,;=0-9]+", RegexOptions.Compiled); - - /// - /// The regular expression to search strings for the opacity attribute. - /// - private static readonly Regex OpacityRegex = new Regex(@"opacity-\d{1,2}(?!\d)|opacity-100", RegexOptions.Compiled); - - /// - /// The regular expression to search strings for the shadow attribute. - /// - private static readonly Regex ShadowRegex = new Regex(@"shadow-true", RegexOptions.Compiled); +/// +/// The regular expression to search strings for. +/// +private static readonly Regex QueryRegex = new Regex(@"watermark=[^&]*", RegexOptions.Compiled); + +/// +/// The regular expression to search strings for the text attribute. +/// +private static readonly Regex TextRegex = new Regex(@"text-[^/:?#\[\]@!$&'()*%\|,;=]+", RegexOptions.Compiled); + +/// +/// The regular expression to search strings for the position attribute. +/// +private static readonly Regex PositionRegex = new Regex(@"position-\d+-\d+", RegexOptions.Compiled); + +/// +/// The regular expression to search strings for the color attribute. +/// +private static readonly Regex ColorRegex = new Regex(@"color-([0-9a-fA-F]{3}){1,2}", RegexOptions.Compiled); + +/// +/// The regular expression to search strings for the fontsize attribute. +/// +private static readonly Regex FontSizeRegex = new Regex(@"size-\d{1,3}", RegexOptions.Compiled); + +/// +/// The regular expression to search strings for the fontstyle attribute. +/// +private static readonly Regex FontStyleRegex = new Regex(@"style-(bold|italic|regular|strikeout|underline)", RegexOptions.Compiled); + +/// +/// The regular expression to search strings for the font family attribute. +/// +private static readonly Regex FontFamilyRegex = new Regex(@"font-[^/:?#\[\]@!$&'()*%\|,;=0-9]+", RegexOptions.Compiled); + +/// +/// The regular expression to search strings for the opacity attribute. +/// +private static readonly Regex OpacityRegex = new Regex(@"opacity-(?:100|[1-9]?[0-9])", RegexOptions.Compiled); + +/// +/// The regular expression to search strings for the shadow attribute. +/// +private static readonly Regex ShadowRegex = new Regex(@"shadow-true", RegexOptions.Compiled); #region IGraphicsProcessor Members /// diff --git a/src/ImageProcessor/Properties/AssemblyInfo.cs b/src/ImageProcessor/Properties/AssemblyInfo.cs index 17908b784d..07501a11f5 100644 --- a/src/ImageProcessor/Properties/AssemblyInfo.cs +++ b/src/ImageProcessor/Properties/AssemblyInfo.cs @@ -7,11 +7,11 @@ using System.Security; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ImageProcessor")] -[assembly: AssemblyDescription("A library for on-the-fly processing of image files with Asp.NET written in C#")] +[assembly: AssemblyDescription("A library for on-the-fly processing of image files written in C#")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("James South")] [assembly: AssemblyProduct("ImageProcessor")] -[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyCopyright("Copyright ©")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,6 +32,6 @@ using System.Security; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.1.0.1")] -[assembly: AssemblyFileVersion("1.1.0.1")] +[assembly: AssemblyVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.2.0.0")] diff --git a/src/Nuget/ImageProcessor.1.0.2.nupkg b/src/Nuget/ImageProcessor.1.0.2.nupkg deleted file mode 100644 index 22643c0d59..0000000000 Binary files a/src/Nuget/ImageProcessor.1.0.2.nupkg and /dev/null differ diff --git a/src/Nuget/ImageProcessor.1.1.0.0.nupkg b/src/Nuget/ImageProcessor.1.1.0.0.nupkg deleted file mode 100644 index 6113d379b5..0000000000 Binary files a/src/Nuget/ImageProcessor.1.1.0.0.nupkg and /dev/null differ diff --git a/src/Nuget/ImageProcessor.1.1.0.1.nupkg b/src/Nuget/ImageProcessor.1.1.0.1.nupkg deleted file mode 100644 index 841174bbbd..0000000000 Binary files a/src/Nuget/ImageProcessor.1.1.0.1.nupkg and /dev/null differ diff --git a/src/Nuget/ImageProcessor.1.2.0.0.nupkg b/src/Nuget/ImageProcessor.1.2.0.0.nupkg new file mode 100644 index 0000000000..8b3b4d21ba Binary files /dev/null and b/src/Nuget/ImageProcessor.1.2.0.0.nupkg differ diff --git a/src/Nuget/ImageProcessor.Web.1.0.2.nupkg b/src/Nuget/ImageProcessor.Web.1.0.2.nupkg deleted file mode 100644 index b9796ec8e2..0000000000 Binary files a/src/Nuget/ImageProcessor.Web.1.0.2.nupkg and /dev/null differ diff --git a/src/Nuget/ImageProcessor.Web.1.1.0.0.nupkg b/src/Nuget/ImageProcessor.Web.1.1.0.0.nupkg deleted file mode 100644 index e759b155a3..0000000000 Binary files a/src/Nuget/ImageProcessor.Web.1.1.0.0.nupkg and /dev/null differ diff --git a/src/Nuget/ImageProcessor.Web.1.1.0.1.nupkg b/src/Nuget/ImageProcessor.Web.1.1.0.1.nupkg deleted file mode 100644 index 2f1e09f938..0000000000 Binary files a/src/Nuget/ImageProcessor.Web.1.1.0.1.nupkg and /dev/null differ diff --git a/src/Nuget/ImageProcessor.Web.1.2.0.0.nupkg b/src/Nuget/ImageProcessor.Web.1.2.0.0.nupkg new file mode 100644 index 0000000000..efd5c7f830 Binary files /dev/null and b/src/Nuget/ImageProcessor.Web.1.2.0.0.nupkg differ