Browse Source

v1.8.3 & v.3.1.0

Former-commit-id: 2c8b0b6e54dd4754fc9506d0e0194c8381630428
pull/17/head
James South 12 years ago
parent
commit
fc21041e42
  1. 4
      src/ImageProcessor.Web/NET45/Properties/AssemblyInfo.cs
  2. 8
      src/ImageProcessor/Imaging/Convolution.cs
  3. 26
      src/ImageProcessor/Imaging/Filters/ComicMatrixFilter.cs
  4. 2
      src/ImageProcessor/Processors/Crop.cs
  5. 4
      src/ImageProcessor/Properties/AssemblyInfo.cs
  6. 1
      src/Nuget/ImageProcessor.1.8.1.0.nupkg.REMOVED.git-id
  7. 1
      src/Nuget/ImageProcessor.1.8.1.1.nupkg.REMOVED.git-id
  8. 1
      src/Nuget/ImageProcessor.1.8.3.0.nupkg.REMOVED.git-id
  9. BIN
      src/Nuget/ImageProcessor.Web.3.0.0.3.nupkg
  10. 51
      src/Nuget/ImageProcessor.Web.3.0.0.3.nuspec
  11. BIN
      src/Nuget/ImageProcessor.Web.3.1.0.0.nupkg
  12. 5
      src/TestWebsites/NET4/config/imageprocessor/processing.config
  13. 3
      src/TestWebsites/NET45/Test_Website_MVC5_NET45/Test_Website_MVC5_NET45.csproj
  14. 4
      src/TestWebsites/NET45/Test_Website_MVC5_NET45/config/imageprocessor/processing.config
  15. 28
      src/TestWebsites/NET45/Test_Website_NET45/Test_Website_MVC_NET45.csproj
  16. 4
      src/TestWebsites/NET45/Test_Website_NET45/config/imageprocessor/processing.config
  17. 4
      src/TestWebsites/NET45/Test_Website_NET45/packages.config
  18. 2
      src/TestWebsites/NET45/Test_Website_Webforms_NET45/Site.Master
  19. 1
      src/TestWebsites/NET45/Test_Website_Webforms_NET45/Test_Website_Webforms_NET45.csproj
  20. 10
      src/TestWebsites/NET45/Test_Website_Webforms_NET45/Web.config
  21. 5
      src/TestWebsites/NET45/Test_Website_Webforms_NET45/config/imageprocessor/processing.config

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

@ -31,6 +31,6 @@ 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("3.0.1.0")]
[assembly: AssemblyFileVersion("3.0.1.0")]
[assembly: AssemblyVersion("3.1.0.0")]
[assembly: AssemblyFileVersion("3.1.0.0")]

8
src/ImageProcessor/Imaging/Convolution.cs

@ -384,10 +384,10 @@ namespace ImageProcessor.Imaging
blue += this.Threshold;
alpha += this.Threshold;
resultBuffer[byteOffset] = blue.ToByte(); // (byte)((blue > 255) ? 255 : ((blue < 0) ? 0 : blue));
resultBuffer[byteOffset + 1] = green.ToByte(); // (byte)((green > 255) ? 255 : ((green < 0) ? 0 : green));
resultBuffer[byteOffset + 2] = red.ToByte(); // (byte)((red > 255) ? 255 : ((red < 0) ? 0 : red));
resultBuffer[byteOffset + 3] = alpha.ToByte(); // (byte)((alpha > 255) ? 255 : ((alpha < 0) ? 0 : alpha));
resultBuffer[byteOffset] = blue.ToByte();
resultBuffer[byteOffset + 1] = green.ToByte();
resultBuffer[byteOffset + 2] = red.ToByte();
resultBuffer[byteOffset + 3] = alpha.ToByte();
}
}

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

@ -99,11 +99,6 @@ namespace ImageProcessor.Imaging.Filters
// Draw the edges.
edgeBitmap = DrawEdges((Bitmap)image, 120);
//GaussianLayer gaussianLayer = new GaussianLayer(1);
//Convolution convolution = new Convolution(gaussianLayer.Sigma) { Threshold = gaussianLayer.Threshold };
//double[,] kernel = convolution.CreateGuassianBlurFilter(gaussianLayer.Size);
//edgeBitmap = convolution.ProcessKernel(edgeBitmap, kernel);
using (Graphics graphics = Graphics.FromImage(highBitmap))
{
graphics.DrawImage(highBitmap, rectangle, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, attributes);
@ -146,11 +141,13 @@ namespace ImageProcessor.Imaging.Filters
using (Graphics graphics = Graphics.FromImage(newImage))
{
// graphics.Clear(Color.Transparent);
// Overlay the image.
graphics.DrawImage(highBitmap, 0, 0);
graphics.DrawImage(lowBitmap, 0, 0);
graphics.DrawImage(edgeBitmap, 0, 0);
// Draw an edge around the image.
using (Pen blackPen = new Pen(Color.Black))
{
@ -503,13 +500,10 @@ namespace ImageProcessor.Imaging.Filters
alpha = 0;
}
blue = blue > 255 ? 255 : (blue < 0 ? 0 : blue);
green = green > 255 ? 255 : (green < 0 ? 0 : green);
red = red > 255 ? 255 : (red < 0 ? 0 : red);
resultBuffer[byteOffset] = (byte)blue;
resultBuffer[byteOffset + 1] = (byte)green;
resultBuffer[byteOffset + 2] = (byte)red;
resultBuffer[byteOffset + 3] = (byte)alpha;
resultBuffer[byteOffset] = blue.ToByte();
resultBuffer[byteOffset + 1] = green.ToByte();
resultBuffer[byteOffset + 2] = red.ToByte();
resultBuffer[byteOffset + 3] = alpha.ToByte();
}
}
@ -550,7 +544,7 @@ namespace ImageProcessor.Imaging.Filters
Rectangle rectangle = new Rectangle(Point.Empty, source.Size);
// Lockbits the source.
// Lock the source.
BitmapData bitmapDataSource = source.LockBits(rectangle, ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
// Declare an array to hold the bytes of the bitmap.
@ -562,10 +556,10 @@ namespace ImageProcessor.Imaging.Filters
// Copy the RGB values into the array.
Marshal.Copy(bitmapDataSource.Scan0, sourceRgbValues, 0, bytes);
// Unlockbits the source.
// Unlock the source.
source.UnlockBits(bitmapDataSource);
// Lockbits the destination.
// Lock the destination.
BitmapData bitmapDataDestination = destination.LockBits(rectangle, ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
// Allocate a buffer for image

2
src/ImageProcessor/Processors/Crop.cs

@ -159,7 +159,6 @@ namespace ImageProcessor.Processors
// Work out the percentages.
float left = cropLayer.Left * sourceWidth;
float top = cropLayer.Top * sourceWidth;
float width = (1 - cropLayer.Left - cropLayer.Right) * sourceWidth;
float height = (1 - cropLayer.Top - cropLayer.Bottom) * sourceHeight;
@ -257,7 +256,6 @@ namespace ImageProcessor.Processors
return CropMode.Pixels;
}
/// <summary>
/// Returns the correct <see cref="CropMode"/> for the given string.
/// </summary>

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.8.2.0")]
[assembly: AssemblyFileVersion("1.8.2.0")]
[assembly: AssemblyVersion("1.8.3.0")]
[assembly: AssemblyFileVersion("1.8.3.0")]

1
src/Nuget/ImageProcessor.1.8.1.0.nupkg.REMOVED.git-id

@ -1 +0,0 @@
997f2cbadc5add62068ac4744395cb619835b25b

1
src/Nuget/ImageProcessor.1.8.1.1.nupkg.REMOVED.git-id

@ -1 +0,0 @@
247fa919ace01d934bd0a19d37587ad26195b33e

1
src/Nuget/ImageProcessor.1.8.3.0.nupkg.REMOVED.git-id

@ -0,0 +1 @@
b334b903dac55dfc5156a814c1fce9cc1f10f744

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

Binary file not shown.

51
src/Nuget/ImageProcessor.Web.3.0.0.3.nuspec

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>ImageProcessor.Web</id>
<version>3.0.0.3</version>
<title>ImageProcessor.Web</title>
<authors>James South</authors>
<owners>James South</owners>
<projectUrl>http://jimbobsquarepants.github.com/ImageProcessor/</projectUrl>
<iconUrl>http://raw.github.com/JimBobSquarePants/ImageProcessor/master/src/Nuget/imageprocessor.128.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>
ImageProcessor.Web adds a configurable HttpModule to your website which allows on-the-fly processing of image files. The module also comes with a file and browser based cache that can handle millions of images, increasing your processing output and saving precious server memory.
Methods include: Resize, Rotate, Rounded Corners, Flip, Crop, Watermark, Filter, Saturation, Brightness, Contrast, Quality, Format, Vignette, Gaussian Blur, Gaussian Sharpen, and Transparency.
This package also requires Microsoft.Bcl.Async on .NET 4.0 which will be added on install if applicable.
If you use ImageProcessor please get in touch via my twitter @james_m_south
Feedback is always welcome
</description>
<summary>An extension to ImageProcessor that allows on-the-fly processing of image files in an ASP.NET website</summary>
<releaseNotes>
- Fixing 404 bug
- Improved cleanup to remove orphaned files
</releaseNotes>
<copyright>James South</copyright>
<language>en-GB</language>
<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</tags>
<dependencies>
<group targetFramework=".NETFramework4.0">
<dependency id="Microsoft.Bcl.Async" version="1.0.165" />
<dependency id="Microsoft.Bcl" version="1.1.6" />
<dependency id="ImageProcessor" version="1.8.0.0" />
</group>
<group targetFramework=".NETFramework4.5">
<dependency id="ImageProcessor" version="1.8.0.0" />
</group>
</dependencies>
</metadata>
<files>
<file src="content\config\imageprocessor\cache.config" target="content\config\imageprocessor\cache.config" />
<file src="content\config\imageprocessor\processing.config" target="content\config\imageprocessor\processing.config" />
<file src="content\config\imageprocessor\security.config" target="content\config\imageprocessor\security.config" />
<file src="content\web.config.transform" target="content\web.config.transform" />
<file src="lib\net40\ImageProcessor.Web.dll" target="lib\net40\ImageProcessor.Web.dll" />
<file src="lib\net45\ImageProcessor.Web.dll" target="lib\net45\ImageProcessor.Web.dll" />
<file src="tools\install.ps1" target="tools\install.ps1" />
</files>
</package>

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

Binary file not shown.

5
src/TestWebsites/NET4/config/imageprocessor/processing.config

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<processing>
<presets>
<preset name="demo" value="width=300&#038;height=150&#038;bgcolor=transparent"/>
<!--<preset name="demo" value="width=300&#038;height=150&#038;bgcolor=transparent"/>-->
</presets>
<plugins autoLoadPlugins="false">
<plugins autoLoadPlugins="true">
<plugin name="Alpha" type="ImageProcessor.Processors.Alpha, ImageProcessor"/>
<plugin name="Brightness" type="ImageProcessor.Processors.Brightness, ImageProcessor"/>
<plugin name="Contrast" type="ImageProcessor.Processors.Contrast, ImageProcessor"/>
@ -30,6 +30,7 @@
<settings>
<setting key="MaxWidth" value="3000"/>
<setting key="MaxHeight" value="3000"/>
<!--<setting key="RestrictTo" value="width=300height=300,width=300height=300"/>-->
</settings>
</plugin>
<plugin name="Rotate" type="ImageProcessor.Processors.Rotate, ImageProcessor"/>

3
src/TestWebsites/NET45/Test_Website_MVC5_NET45/Test_Website_MVC5_NET45.csproj

@ -176,6 +176,9 @@
<Content Include="Content\Site.css" />
<Content Include="Scripts\bootstrap.js" />
<Content Include="Scripts\bootstrap.min.js" />
<Content Include="config\imageprocessor\cache.config" />
<Content Include="config\imageprocessor\processing.config" />
<Content Include="config\imageprocessor\security.config" />
<None Include="Scripts\jquery-1.10.2.intellisense.js" />
<Content Include="Scripts\jquery-1.10.2.js" />
<Content Include="Scripts\jquery-1.10.2.min.js" />

4
src/TestWebsites/NET45/Test_Website_MVC5_NET45/config/imageprocessor/processing.config

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<processing>
<presets>
<preset name="demo" value="width=300&#038;height=150&#038;bgcolor=transparent"/>
<!--<preset name="demo" value="width=300&#038;height=150&#038;bgcolor=transparent"/>-->
</presets>
<plugins autoLoadPlugins="false">
<plugins autoLoadPlugins="true">
<plugin name="Alpha" type="ImageProcessor.Processors.Alpha, ImageProcessor"/>
<plugin name="Brightness" type="ImageProcessor.Processors.Brightness, ImageProcessor"/>
<plugin name="Contrast" type="ImageProcessor.Processors.Contrast, ImageProcessor"/>

28
src/TestWebsites/NET45/Test_Website_NET45/Test_Website_MVC_NET45.csproj

@ -42,6 +42,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.Mvc.FixedDisplayModes">
<HintPath>..\..\..\packages\Microsoft.AspNet.Mvc.FixedDisplayModes.1.0.1\lib\net40\Microsoft.Web.Mvc.FixedDisplayModes.dll</HintPath>
</Reference>
@ -57,6 +61,30 @@
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\..\..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\..\..\packages\Microsoft.AspNet.Mvc.4.0.30506.0\lib\net40\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\..\..\packages\Microsoft.AspNet.Razor.2.0.30506.0\lib\net40\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\..\..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\..\..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\..\..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />

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

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<processing>
<presets>
<preset name="demo" value="width=300&#038;height=150&#038;bgcolor=transparent"/>
<!--<preset name="demo" value="width=300&#038;height=150&#038;bgcolor=transparent"/>-->
</presets>
<plugins autoLoadPlugins="false">
<plugins autoLoadPlugins="true">
<plugin name="Alpha" type="ImageProcessor.Processors.Alpha, ImageProcessor"/>
<plugin name="Brightness" type="ImageProcessor.Processors.Brightness, ImageProcessor"/>
<plugin name="Contrast" type="ImageProcessor.Processors.Contrast, ImageProcessor"/>

4
src/TestWebsites/NET45/Test_Website_NET45/packages.config

@ -1,10 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AspNet.Mvc" version="4.0.30506.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc.FixedDisplayModes" version="1.0.1" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="2.0.30506.0" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net45" />
</packages>

2
src/TestWebsites/NET45/Test_Website_Webforms_NET45/Site.Master

@ -21,8 +21,6 @@
<%--Framework Scripts--%>
<asp:ScriptReference Name="MsAjaxBundle" />
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="jquery.ui.combined" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />

1
src/TestWebsites/NET45/Test_Website_Webforms_NET45/Test_Website_Webforms_NET45.csproj

@ -52,6 +52,7 @@
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />

10
src/TestWebsites/NET45/Test_Website_Webforms_NET45/Web.config

@ -62,11 +62,11 @@
<add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
</providers>
</sessionState>
<httpModules>
<!--<httpModules>
<add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web" />
</httpModules>
</httpModules>-->
</system.web>
<system.webServer>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web" />
@ -86,6 +86,10 @@
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>

5
src/TestWebsites/NET45/Test_Website_Webforms_NET45/config/imageprocessor/processing.config

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<processing>
<presets>
<preset name="demo" value="width=300&#038;height=150&#038;bgcolor=transparent"/>
<!--<preset name="demo" value="width=300&#038;height=150&#038;bgcolor=transparent"/>-->
</presets>
<plugins autoLoadPlugins="false">
<plugins autoLoadPlugins="true">
<plugin name="Alpha" type="ImageProcessor.Processors.Alpha, ImageProcessor"/>
<plugin name="Brightness" type="ImageProcessor.Processors.Brightness, ImageProcessor"/>
<plugin name="Contrast" type="ImageProcessor.Processors.Contrast, ImageProcessor"/>
@ -30,6 +30,7 @@
<settings>
<setting key="MaxWidth" value="3000"/>
<setting key="MaxHeight" value="3000"/>
<!--<setting key="RestrictTo" value="width=300height=300,width=300height=300"/>-->
</settings>
</plugin>
<plugin name="Rotate" type="ImageProcessor.Processors.Rotate, ImageProcessor"/>

Loading…
Cancel
Save