Browse Source

v1.9.2, v3.2.5, v1.1.1

Build now uses client profile.
Added ability to preserve EXIF Metadata.
Remote requests without parameters now redirect to url.


Former-commit-id: 45a90beee8329609e5cbcbf8b0702ec85f674e07
pull/17/head
James South 12 years ago
parent
commit
68c968a95a
  1. 6
      build/Build.bat
  2. 8
      build/NuSpecs/ImageProcessor.Web.Config.nuspec
  3. 4
      build/NuSpecs/ImageProcessor.Web.nuspec
  4. 11
      src/ImageProcessor.Web/NET45/Config/ImageProcessingSection.cs
  5. 11
      src/ImageProcessor.Web/NET45/Config/ImageProcessorConfig.cs
  6. 2
      src/ImageProcessor.Web/NET45/Config/Resources/processing.config
  7. 12
      src/ImageProcessor.Web/NET45/HttpModules/ImageProcessingModule.cs
  8. 4
      src/ImageProcessor.Web/NET45/Properties/AssemblyInfo.cs
  9. 1
      src/ImageProcessor.Web/NET45/Settings.StyleCop
  10. 4
      src/ImageProcessor/ImageFactory.cs
  11. 4
      src/ImageProcessor/Properties/AssemblyInfo.cs
  12. 2
      src/TestWebsites/NET45/Test_Website_NET45/config/imageprocessor/processing.config

6
build/Build.bat

@ -1,7 +1,7 @@
@ECHO OFF
SET version=1.9.1.0
SET webversion=3.2.4.0
SET webconfigversion=1.1.0.0
SET version=1.9.2.0
SET webversion=3.2.5.0
SET webconfigversion=1.1.1.0
ECHO Building ImageProcessor %version%, ImageProcess.Web %webversion% and ImageProcess.Web.Config %webconfigversion%

8
build/NuSpecs/ImageProcessor.Web.Config.nuspec

@ -21,12 +21,12 @@ Feedback is always welcome</description>
<tags>Image Imaging ASP Performance Processing HttpModule Cache Resize Rotate RoundedCorners Flip Crop Filter Effects Quality Watermark Alpha Vignette Saturation Brightness Contrast Gif Jpg Jpeg Bitmap Png Fluent GDI Gaussian Blur Sharpen Tint Quantizer Animated</tags>
<dependencies>
<group targetFramework=".NETFramework4.0">
<dependency id="ImageProcessor" version="1.9.0.0" />
<dependency id="ImageProcessor.Web" version="3.2.3.0" />
<dependency id="ImageProcessor" version="1.9.2.0" />
<dependency id="ImageProcessor.Web" version="3.2.5.0" />
</group>
<group targetFramework=".NETFramework4.5">
<dependency id="ImageProcessor" version="1.9.0.0" />
<dependency id="ImageProcessor.Web" version="3.2.3.0" />
<dependency id="ImageProcessor" version="1.9.2.0" />
<dependency id="ImageProcessor.Web" version="3.2.5.0" />
</group>
</dependencies>
</metadata>

4
build/NuSpecs/ImageProcessor.Web.nuspec

@ -28,11 +28,11 @@ Feedback is always welcome</description>
<dependency id="Microsoft.Bcl.Async" version="1.0.168" />
<dependency id="Microsoft.Bcl" version="1.1.8" />
<dependency id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
<dependency id="ImageProcessor" version="1.9.0.0" />
<dependency id="ImageProcessor" version="1.9.2.0" />
</group>
<group targetFramework=".NETFramework4.5">
<dependency id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
<dependency id="ImageProcessor" version="1.9.0.0" />
<dependency id="ImageProcessor" version="1.9.2.0" />
</group>
</dependencies>
</metadata>

11
src/ImageProcessor.Web/NET45/Config/ImageProcessingSection.cs

@ -26,6 +26,17 @@ namespace ImageProcessor.Web.Config
public sealed class ImageProcessingSection : ConfigurationSection
{
#region Properties
/// <summary>
/// Gets or sets a value indicating whether to preserve exif meta data.
/// </summary>
[ConfigurationProperty("preserveExifMetaData", IsRequired = false, DefaultValue = false)]
public bool PreserveExifMetaData
{
get { return (bool)this["preserveExifMetaData"]; }
set { this["preserveExifMetaData"] = value; }
}
/// <summary>
/// Gets the <see cref="T:ImageProcessor.Web.Config.ImageProcessingSection.PresetElementCollection"/>.
/// </summary>

11
src/ImageProcessor.Web/NET45/Config/ImageProcessorConfig.cs

@ -90,6 +90,17 @@ namespace ImageProcessor.Web.Config
/// </summary>
public IList<IGraphicsProcessor> GraphicsProcessors { get; private set; }
/// <summary>
/// Gets a value indicating whether to preserve exif meta data.
/// </summary>
public bool PreserveExifMetaData
{
get
{
return GetImageProcessingSection().PreserveExifMetaData;
}
}
#region Caching
/// <summary>
/// Gets the maximum number of days to store images in the cache.

2
src/ImageProcessor.Web/NET45/Config/Resources/processing.config

@ -1,4 +1,4 @@
<processing>
<processing preserveExifMetaData="false">
<presets>
</presets>
<plugins autoLoadPlugins="true">

12
src/ImageProcessor.Web/NET45/HttpModules/ImageProcessingModule.cs

@ -65,6 +65,11 @@ namespace ImageProcessor.Web.HttpModules
/// </summary>
private static string remotePrefix;
/// <summary>
/// Whether to preserve exif meta data.
/// </summary>
private static bool? preserveExifMetaData;
/// <summary>
/// A value indicating whether this instance of the given entity has been disposed.
/// </summary>
@ -115,6 +120,11 @@ namespace ImageProcessor.Web.HttpModules
remotePrefix = ImageProcessorConfig.Instance.RemotePrefix;
}
if (preserveExifMetaData == null)
{
preserveExifMetaData = ImageProcessorConfig.Instance.PreserveExifMetaData;
}
#if NET45
EventHandlerTaskAsyncHelper wrapper = new EventHandlerTaskAsyncHelper(this.PostAuthorizeRequest);
context.AddOnPostAuthorizeRequestAsync(wrapper.BeginEventHandler, wrapper.EndEventHandler);
@ -370,7 +380,7 @@ namespace ImageProcessor.Web.HttpModules
string cachedPath = cache.CachedPath;
// Process the image.
using (ImageFactory imageFactory = new ImageFactory())
using (ImageFactory imageFactory = new ImageFactory(preserveExifMetaData != null && preserveExifMetaData.Value))
{
if (isRemote)
{

4
src/ImageProcessor.Web/NET45/Properties/AssemblyInfo.cs

@ -35,5 +35,5 @@ using ImageProcessor.Web.HttpModules;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("3.2.4.0")]
[assembly: AssemblyFileVersion("3.2.4.0")]
[assembly: AssemblyVersion("3.2.5.0")]
[assembly: AssemblyFileVersion("3.2.5.0")]

1
src/ImageProcessor.Web/NET45/Settings.StyleCop

@ -1,6 +1,7 @@
<StyleCopSettings Version="105">
<GlobalSettings>
<CollectionProperty Name="RecognizedWords">
<Value>exif</Value>
<Value>Mutexes</Value>
<Value>querystring</Value>
</CollectionProperty>

4
src/ImageProcessor/ImageFactory.cs

@ -71,9 +71,9 @@ namespace ImageProcessor
/// Initializes a new instance of the <see cref="ImageFactory"/> class.
/// </summary>
/// <param name="preserveExifData">
/// Whether to preserve exif metadata. Defaults to true.
/// Whether to preserve exif metadata. Defaults to false.
/// </param>
public ImageFactory(bool preserveExifData = true)
public ImageFactory(bool preserveExifData = false)
{
this.PreserveExifData = preserveExifData;
this.ExifPropertyItems = new ConcurrentDictionary<int, PropertyItem>();

4
src/ImageProcessor/Properties/AssemblyInfo.cs

@ -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.9.1.0")]
[assembly: AssemblyFileVersion("1.9.1.0")]
[assembly: AssemblyVersion("1.9.2.0")]
[assembly: AssemblyFileVersion("1.9.2.0")]

2
src/TestWebsites/NET45/Test_Website_NET45/config/imageprocessor/processing.config

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<processing>
<processing preserveExifMetaData="false">
<presets>
<preset name="demo" value="width=300&#038;height=150&#038;bgcolor=transparent"/>
</presets>

Loading…
Cancel
Save