Browse Source

V1.2.0

Former-commit-id: c272278520718696f82feab5b2ebde9b3649c804
af/merge-core
James South 13 years ago
parent
commit
6116f3716d
  1. 3
      src/ImageProcessor.Web/Caching/DiskCache.cs
  2. 9
      src/ImageProcessor.Web/Config/ImageCacheSection.cs
  3. 3
      src/ImageProcessor.Web/Config/ImageProcessingSection.cs
  4. 3
      src/ImageProcessor.Web/Config/ImageProcessorConfig.cs
  5. 3
      src/ImageProcessor.Web/Config/ImageSecuritySection.cs
  6. 3
      src/ImageProcessor.Web/Helpers/FileCompareLastwritetime.cs
  7. 3
      src/ImageProcessor.Web/Helpers/RemoteFile.cs
  8. 7
      src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs
  9. 3
      src/ImageProcessor.Web/ImageFactoryExtensions.cs
  10. 10
      src/ImageProcessor.Web/Properties/AssemblyInfo.cs
  11. 3
      src/ImageProcessor/ImageFactory.cs
  12. 3
      src/ImageProcessor/Imaging/Filters/BlackWhiteMatrixFilter.cs
  13. 3
      src/ImageProcessor/Imaging/Filters/ColorMatrixes.cs
  14. 3
      src/ImageProcessor/Imaging/Filters/ComicMatrixFilter.cs
  15. 3
      src/ImageProcessor/Imaging/Filters/GothamMatrixFilter.cs
  16. 3
      src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs
  17. 3
      src/ImageProcessor/Imaging/Filters/HiSatchMatrixFilter.cs
  18. 3
      src/ImageProcessor/Imaging/Filters/IMatrixFilter.cs
  19. 3
      src/ImageProcessor/Imaging/Filters/InvertMatrixFilter.cs
  20. 3
      src/ImageProcessor/Imaging/Filters/LoSatchMatrixFilter.cs
  21. 3
      src/ImageProcessor/Imaging/Filters/LomographMatrixFilter.cs
  22. 3
      src/ImageProcessor/Imaging/Filters/PolaroidMatrixFilter.cs
  23. 3
      src/ImageProcessor/Imaging/Filters/SepiaMatrixFilter.cs
  24. 3
      src/ImageProcessor/Imaging/ImageUtils.cs
  25. 3
      src/ImageProcessor/Imaging/OctreeQuantizer.cs
  26. 3
      src/ImageProcessor/Imaging/Quantizer.cs
  27. 3
      src/ImageProcessor/Imaging/ResponseType.cs
  28. 3
      src/ImageProcessor/Imaging/RotateLayer.cs
  29. 3
      src/ImageProcessor/Imaging/TextLayer.cs
  30. 5
      src/ImageProcessor/Processors/Alpha.cs
  31. 3
      src/ImageProcessor/Processors/Crop.cs
  32. 3
      src/ImageProcessor/Processors/Filter.cs
  33. 3
      src/ImageProcessor/Processors/Format.cs
  34. 3
      src/ImageProcessor/Processors/IGraphicsProcessor.cs
  35. 7
      src/ImageProcessor/Processors/Quality.cs
  36. 48
      src/ImageProcessor/Processors/Resize.cs
  37. 7
      src/ImageProcessor/Processors/Rotate.cs
  38. 3
      src/ImageProcessor/Processors/Vignette.cs
  39. 91
      src/ImageProcessor/Processors/Watermark.cs
  40. 8
      src/ImageProcessor/Properties/AssemblyInfo.cs
  41. BIN
      src/Nuget/ImageProcessor.1.0.2.nupkg
  42. BIN
      src/Nuget/ImageProcessor.1.1.0.0.nupkg
  43. BIN
      src/Nuget/ImageProcessor.1.1.0.1.nupkg
  44. BIN
      src/Nuget/ImageProcessor.1.2.0.0.nupkg
  45. BIN
      src/Nuget/ImageProcessor.Web.1.0.2.nupkg
  46. BIN
      src/Nuget/ImageProcessor.Web.1.1.0.0.nupkg
  47. BIN
      src/Nuget/ImageProcessor.Web.1.1.0.1.nupkg
  48. BIN
      src/Nuget/ImageProcessor.Web.1.2.0.0.nupkg

3
src/ImageProcessor.Web/Caching/DiskCache.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="DiskCache.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

9
src/ImageProcessor.Web/Config/ImageCacheSection.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="ImageCacheSection.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------
@ -41,9 +42,9 @@ namespace ImageProcessor.Web.Config
/// Gets or sets the maximum number of days to store an image in the cache.
/// </summary>
/// <value>The maximum number of days to store an image in the cache.</value>
/// <remarks>Defaults to 7 if not set. Maximum of 28.</remarks>
[ConfigurationProperty("maxDays", DefaultValue = "7", IsRequired = false)]
[IntegerValidator(ExcludeRange = false, MaxValue = 28, MinValue = 0)]
/// <remarks>Defaults to 28 if not set.</remarks>
[ConfigurationProperty("maxDays", DefaultValue = "28", IsRequired = false)]
[IntegerValidator(ExcludeRange = false, MinValue = 0)]
public int MaxDays
{
get

3
src/ImageProcessor.Web/Config/ImageProcessingSection.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="ImageProcessingSection.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor.Web/Config/ImageProcessorConfig.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="ImageProcessorConfig.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor.Web/Config/ImageSecuritySection.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="ImageSecuritySection.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor.Web/Helpers/FileCompareLastwritetime.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="FileCompareLastwritetime.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor.Web/Helpers/RemoteFile.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="RemoteFile.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

7
src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="ImageProcessingModule.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------
@ -20,7 +21,7 @@ namespace ImageProcessor.Web.HttpModules
#endregion
/// <summary>
/// TODO: Update summary.
/// Processes any image requests within the web application.
/// </summary>
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)

3
src/ImageProcessor.Web/ImageFactoryExtensions.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="ImageFactoryExtensions.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

10
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")]

3
src/ImageProcessor/ImageFactory.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="ImageFactory.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Filters/BlackWhiteMatrixFilter.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="BlackWhiteMatrixFilter.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Filters/ColorMatrixes.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="ColorMatrixes.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Filters/ComicMatrixFilter.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="ComicMatrixFilter.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Filters/GothamMatrixFilter.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="GothamMatrixFilter.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="GreyScaleMatrixFilter.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Filters/HiSatchMatrixFilter.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="HiSatchMatrixFilter.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Filters/IMatrixFilter.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="IMatrixFilter.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Filters/InvertMatrixFilter.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="InvertMatrixFilter.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Filters/LoSatchMatrixFilter.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="LoSatchMatrixFilter.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Filters/LomographMatrixFilter.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="LomographMatrixFilter.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Filters/PolaroidMatrixFilter.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="PolaroidMatrixFilter.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Filters/SepiaMatrixFilter.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="SepiaMatrixFilter.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/ImageUtils.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="ImageUtils.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/OctreeQuantizer.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="OctreeQuantizer.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/Quantizer.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="Quantizer.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/ResponseType.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="ResponseType.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/RotateLayer.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="RotateLayer.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Imaging/TextLayer.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="TextLayer.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

5
src/ImageProcessor/Processors/Alpha.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="Alpha.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------
@ -23,7 +24,7 @@ namespace ImageProcessor.Processors
/// The regular expression to search strings for.
/// http://stackoverflow.com/a/6400969/427899
/// </summary>
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
/// <summary>

3
src/ImageProcessor/Processors/Crop.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="Crop.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Processors/Filter.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="Filter.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Processors/Format.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="Format.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

3
src/ImageProcessor/Processors/IGraphicsProcessor.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="IGraphicsProcessor.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

7
src/ImageProcessor/Processors/Quality.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="Quality.cs" company="">
// TODO: Update copyright text.
// <copyright file="Quality.cs" company="James South">
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------
@ -21,7 +22,7 @@ namespace ImageProcessor.Processors
/// <summary>
/// The regular expression to search strings for.
/// </summary>
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
/// <summary>

48
src/ImageProcessor/Processors/Resize.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="Resize.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------
@ -24,7 +25,7 @@ namespace ImageProcessor.Processors
/// <summary>
/// The regular expression to search strings for.
/// </summary>
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
/// <summary>
@ -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;
}
}

7
src/ImageProcessor/Processors/Rotate.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="Rotate.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------
@ -23,12 +24,12 @@ namespace ImageProcessor.Processors
/// <summary>
/// The regular expression to search strings for.
/// </summary>
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);
/// <summary>
/// The regular expression to search strings for the angle attribute.
/// </summary>
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);
/// <summary>
/// The regular expression to search strings for the color attribute.

3
src/ImageProcessor/Processors/Vignette.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="Vignette.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------

91
src/ImageProcessor/Processors/Watermark.cs

@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// <copyright file="Watermark.cs" company="James South">
// TODO: Update copyright text.
// Copyright (c) James South.
// Dual licensed under the MIT or GPL Version 2 licenses.
// </copyright>
// -----------------------------------------------------------------------
@ -23,50 +24,50 @@ namespace ImageProcessor.Processors
/// </summary>
public class Watermark : IGraphicsProcessor
{
/// <summary>
/// The regular expression to search strings for.
/// </summary>
private static readonly Regex QueryRegex = new Regex(@"watermark=[^&]*", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the text attribute.
/// </summary>
private static readonly Regex TextRegex = new Regex(@"text-[^/:?#\[\]@!$&'()*%\|,;=]+", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the position attribute.
/// </summary>
private static readonly Regex PositionRegex = new Regex(@"position-\d+-\d+", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the color attribute.
/// </summary>
private static readonly Regex ColorRegex = new Regex(@"color-([0-9a-fA-F]{3}){1,2}", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the fontsize attribute.
/// </summary>
private static readonly Regex FontSizeRegex = new Regex(@"size-\d{1,3}", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the fontstyle attribute.
/// </summary>
private static readonly Regex FontStyleRegex = new Regex(@"style-(bold|italic|regular|strikeout|underline)", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the font family attribute.
/// </summary>
private static readonly Regex FontFamilyRegex = new Regex(@"font-[^/:?#\[\]@!$&'()*%\|,;=0-9]+", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the opacity attribute.
/// </summary>
private static readonly Regex OpacityRegex = new Regex(@"opacity-\d{1,2}(?!\d)|opacity-100", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the shadow attribute.
/// </summary>
private static readonly Regex ShadowRegex = new Regex(@"shadow-true", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for.
/// </summary>
private static readonly Regex QueryRegex = new Regex(@"watermark=[^&]*", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the text attribute.
/// </summary>
private static readonly Regex TextRegex = new Regex(@"text-[^/:?#\[\]@!$&'()*%\|,;=]+", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the position attribute.
/// </summary>
private static readonly Regex PositionRegex = new Regex(@"position-\d+-\d+", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the color attribute.
/// </summary>
private static readonly Regex ColorRegex = new Regex(@"color-([0-9a-fA-F]{3}){1,2}", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the fontsize attribute.
/// </summary>
private static readonly Regex FontSizeRegex = new Regex(@"size-\d{1,3}", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the fontstyle attribute.
/// </summary>
private static readonly Regex FontStyleRegex = new Regex(@"style-(bold|italic|regular|strikeout|underline)", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the font family attribute.
/// </summary>
private static readonly Regex FontFamilyRegex = new Regex(@"font-[^/:?#\[\]@!$&'()*%\|,;=0-9]+", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the opacity attribute.
/// </summary>
private static readonly Regex OpacityRegex = new Regex(@"opacity-(?:100|[1-9]?[0-9])", RegexOptions.Compiled);
/// <summary>
/// The regular expression to search strings for the shadow attribute.
/// </summary>
private static readonly Regex ShadowRegex = new Regex(@"shadow-true", RegexOptions.Compiled);
#region IGraphicsProcessor Members
/// <summary>

8
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")]

BIN
src/Nuget/ImageProcessor.1.0.2.nupkg

Binary file not shown.

BIN
src/Nuget/ImageProcessor.1.1.0.0.nupkg

Binary file not shown.

BIN
src/Nuget/ImageProcessor.1.1.0.1.nupkg

Binary file not shown.

BIN
src/Nuget/ImageProcessor.1.2.0.0.nupkg

Binary file not shown.

BIN
src/Nuget/ImageProcessor.Web.1.0.2.nupkg

Binary file not shown.

BIN
src/Nuget/ImageProcessor.Web.1.1.0.0.nupkg

Binary file not shown.

BIN
src/Nuget/ImageProcessor.Web.1.1.0.1.nupkg

Binary file not shown.

BIN
src/Nuget/ImageProcessor.Web.1.2.0.0.nupkg

Binary file not shown.
Loading…
Cancel
Save