mirror of https://github.com/SixLabors/ImageSharp
187 changed files with 81 additions and 1870 deletions
@ -1,226 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<PropertyGroup> |
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
||||
<ProductVersion>8.0.30703</ProductVersion> |
|
||||
<SchemaVersion>2.0</SchemaVersion> |
|
||||
<ProjectGuid>{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}</ProjectGuid> |
|
||||
<OutputType>Library</OutputType> |
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|
||||
<RootNamespace>ImageProcessor.Web</RootNamespace> |
|
||||
<AssemblyName>ImageProcessor.Web</AssemblyName> |
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
|
||||
<FileAlignment>512</FileAlignment> |
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> |
|
||||
<RestorePackages>true</RestorePackages> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
||||
<DebugSymbols>true</DebugSymbols> |
|
||||
<DebugType>full</DebugType> |
|
||||
<Optimize>false</Optimize> |
|
||||
<OutputPath>bin\Debug\</OutputPath> |
|
||||
<DefineConstants>TRACE;DEBUG;USE_CSHARP_SQLITE</DefineConstants> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<WarningLevel>4</WarningLevel> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
||||
<DebugType>pdbonly</DebugType> |
|
||||
<Optimize>true</Optimize> |
|
||||
<OutputPath>bin\Release\</OutputPath> |
|
||||
<DefineConstants>TRACE;USE_CSHARP_SQLITE</DefineConstants> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<WarningLevel>4</WarningLevel> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'All|AnyCPU'"> |
|
||||
<DebugSymbols>true</DebugSymbols> |
|
||||
<OutputPath>bin\All\</OutputPath> |
|
||||
<DefineConstants>TRACE;DEBUG;USE_CSHARP_SQLITE</DefineConstants> |
|
||||
<DebugType>full</DebugType> |
|
||||
<PlatformTarget>AnyCPU</PlatformTarget> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
</PropertyGroup> |
|
||||
<ItemGroup> |
|
||||
<Reference Include="Microsoft.CSharp" /> |
|
||||
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> |
|
||||
<SpecificVersion>False</SpecificVersion> |
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> |
|
||||
<SpecificVersion>False</SpecificVersion> |
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> |
|
||||
<SpecificVersion>False</SpecificVersion> |
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="System" /> |
|
||||
<Reference Include="System.Configuration" /> |
|
||||
<Reference Include="System.Core" /> |
|
||||
<Reference Include="System.Drawing" /> |
|
||||
<Reference Include="System.IO"> |
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.1.1.9\lib\net40\System.IO.dll</HintPath> |
|
||||
<Private>True</Private> |
|
||||
</Reference> |
|
||||
<Reference Include="System.Net" /> |
|
||||
<Reference Include="System.Runtime"> |
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.1.1.9\lib\net40\System.Runtime.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="System.Runtime.Caching" /> |
|
||||
<Reference Include="System.Threading.Tasks"> |
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.1.1.9\lib\net40\System.Threading.Tasks.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="System.Web" /> |
|
||||
<Reference Include="System.Data" /> |
|
||||
<Reference Include="System.XML" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Compile Include="..\NET45\Caching\CachedImage.cs" /> |
|
||||
<Compile Include="..\NET45\Caching\CacheIndexer.cs"> |
|
||||
<Link>CacheIndexer.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Caching\DiskCache.cs" /> |
|
||||
<Compile Include="..\NET45\Caching\MemCache.cs"> |
|
||||
<Link>MemCache.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Configuration\ImageCacheSection.cs"> |
|
||||
<Link>ImageCacheSection.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Configuration\ImageProcessingSection.cs"> |
|
||||
<Link>ImageProcessingSection.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Configuration\ImageProcessorConfiguration.cs"> |
|
||||
<Link>ImageProcessorConfiguration.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Configuration\ImageSecuritySection.cs"> |
|
||||
<Link>ImageSecuritySection.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Extensions\DirectoryInfoExtensions.cs"> |
|
||||
<Link>DirectoryInfoExtensions.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Extensions\StringExtensions.cs"> |
|
||||
<Link>StringExtensions.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Helpers\AsyncDeDuperLock.cs"> |
|
||||
<Link>AsyncDeDuperLock.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Helpers\CommonParameterParserUtility.cs"> |
|
||||
<Link>CommonParameterParserUtility.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Helpers\ImageHelpers.cs"> |
|
||||
<Link>ImageHelpers.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Helpers\NativeMethods.cs"> |
|
||||
<Link>NativeMethods.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Helpers\RemoteFile.cs" /> |
|
||||
<Compile Include="..\NET45\Helpers\ResourceHelpers.cs"> |
|
||||
<Link>ResourceHelpers.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Helpers\TaskHelpers.cs" /> |
|
||||
<Compile Include="..\NET45\HttpModules\ImageProcessingModule.cs" /> |
|
||||
<Compile Include="..\NET45\ImageFactoryExtensions.cs" /> |
|
||||
<Compile Include="..\NET45\Processors\Alpha.cs"> |
|
||||
<Link>Alpha.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\AutoRotate.cs"> |
|
||||
<Link>AutoRotate.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\BackgroundColor.cs"> |
|
||||
<Link>BackgroundColor.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Brightness.cs"> |
|
||||
<Link>Brightness.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Contrast.cs"> |
|
||||
<Link>Contrast.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Crop.cs"> |
|
||||
<Link>Crop.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Filter.cs"> |
|
||||
<Link>Filter.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Flip.cs"> |
|
||||
<Link>Flip.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Format.cs"> |
|
||||
<Link>Format.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\GaussianBlur.cs"> |
|
||||
<Link>GaussianBlur.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\GaussianSharpen.cs"> |
|
||||
<Link>GaussianSharpen.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\IWebGraphicsProcessor.cs"> |
|
||||
<Link>IWebGraphicsProcessor.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Quality.cs"> |
|
||||
<Link>Quality.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Resize.cs"> |
|
||||
<Link>Resize.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Rotate.cs"> |
|
||||
<Link>Rotate.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\RoundedCorners.cs"> |
|
||||
<Link>RoundedCorners.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Saturation.cs"> |
|
||||
<Link>Saturation.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Tint.cs"> |
|
||||
<Link>Tint.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Vignette.cs"> |
|
||||
<Link>Vignette.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Processors\Watermark.cs"> |
|
||||
<Link>Watermark.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\NET45\Properties\AssemblyInfo.cs" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<ProjectReference Include="..\..\ImageProcessor\ImageProcessor.csproj"> |
|
||||
<Project>{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}</Project> |
|
||||
<Name>ImageProcessor</Name> |
|
||||
</ProjectReference> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<None Include="..\NET45\Configuration\Resources\cache.config"> |
|
||||
<Link>Configuration\Resources\cache.config</Link> |
|
||||
</None> |
|
||||
<None Include="..\NET45\Configuration\Resources\processing.config"> |
|
||||
<Link>Configuration\Resources\processing.config</Link> |
|
||||
</None> |
|
||||
<None Include="..\NET45\Configuration\Resources\security.config"> |
|
||||
<Link>Configuration\Resources\security.config</Link> |
|
||||
</None> |
|
||||
<None Include="app.config"> |
|
||||
<SubType>Designer</SubType> |
|
||||
</None> |
|
||||
<None Include="packages.config"> |
|
||||
<SubType>Designer</SubType> |
|
||||
</None> |
|
||||
</ItemGroup> |
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|
||||
<PropertyGroup> |
|
||||
<PostBuildEvent> |
|
||||
</PostBuildEvent> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> |
|
||||
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" /> |
|
||||
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''"> |
|
||||
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" /> |
|
||||
<Error Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" /> |
|
||||
</Target> |
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|
||||
Other similar extension points exist, see Microsoft.Common.targets. |
|
||||
<Target Name="BeforeBuild"> |
|
||||
</Target> |
|
||||
<Target Name="AfterBuild"> |
|
||||
</Target> |
|
||||
--> |
|
||||
</Project> |
|
||||
@ -1,15 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<configuration> |
|
||||
<runtime> |
|
||||
<assemblyBinding xmlns:bcl="urn:schemas-microsoft-com:bcl" xmlns="urn:schemas-microsoft-com:asm.v1"> |
|
||||
<dependentAssembly bcl:name="System.Runtime"> |
|
||||
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> |
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" /> |
|
||||
</dependentAssembly> |
|
||||
<dependentAssembly bcl:name="System.Threading.Tasks"> |
|
||||
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> |
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" /> |
|
||||
</dependentAssembly> |
|
||||
</assemblyBinding> |
|
||||
</runtime> |
|
||||
</configuration> |
|
||||
@ -1,6 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<packages> |
|
||||
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net40" /> |
|
||||
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" /> |
|
||||
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" /> |
|
||||
</packages> |
|
||||
@ -1,50 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Web; |
|
||||
using System.Web.Mvc; |
|
||||
|
|
||||
namespace Test.Controllers |
|
||||
{ |
|
||||
public class HomeController : Controller |
|
||||
{ |
|
||||
//
|
|
||||
// GET: /Home/
|
|
||||
|
|
||||
public ActionResult Index() |
|
||||
{ |
|
||||
return this.View(); |
|
||||
} |
|
||||
|
|
||||
public ActionResult Png() |
|
||||
{ |
|
||||
return this.View(); |
|
||||
} |
|
||||
|
|
||||
public ActionResult Png8() |
|
||||
{ |
|
||||
return this.View(); |
|
||||
} |
|
||||
|
|
||||
public ActionResult Gif() |
|
||||
{ |
|
||||
return this.View(); |
|
||||
} |
|
||||
|
|
||||
public ActionResult Bmp() |
|
||||
{ |
|
||||
return View(); |
|
||||
} |
|
||||
|
|
||||
public ActionResult Tiff() |
|
||||
{ |
|
||||
return View(); |
|
||||
} |
|
||||
|
|
||||
public ActionResult External() |
|
||||
{ |
|
||||
return this.View(); |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
@ -1 +0,0 @@ |
|||||
<%@ Application Codebehind="Global.asax.cs" Inherits="Test.MvcApplication" Language="C#" %> |
|
||||
@ -1,40 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Web; |
|
||||
using System.Web.Mvc; |
|
||||
using System.Web.Routing; |
|
||||
|
|
||||
namespace Test |
|
||||
{ |
|
||||
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
|
|
||||
// visit http://go.microsoft.com/?LinkId=9394801
|
|
||||
|
|
||||
public class MvcApplication : System.Web.HttpApplication |
|
||||
{ |
|
||||
public static void RegisterGlobalFilters(GlobalFilterCollection filters) |
|
||||
{ |
|
||||
filters.Add(new HandleErrorAttribute()); |
|
||||
} |
|
||||
|
|
||||
public static void RegisterRoutes(RouteCollection routes) |
|
||||
{ |
|
||||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); |
|
||||
|
|
||||
routes.MapRoute( |
|
||||
"Default", // Route name
|
|
||||
"{controller}/{action}/{id}", // URL with parameters
|
|
||||
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
|
|
||||
); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected void Application_Start() |
|
||||
{ |
|
||||
AreaRegistration.RegisterAllAreas(); |
|
||||
|
|
||||
RegisterGlobalFilters(GlobalFilters.Filters); |
|
||||
RegisterRoutes(RouteTable.Routes); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,35 +0,0 @@ |
|||||
using System.Reflection; |
|
||||
using System.Runtime.CompilerServices; |
|
||||
using System.Runtime.InteropServices; |
|
||||
|
|
||||
// General Information about an assembly is controlled through the following
|
|
||||
// set of attributes. Change these attribute values to modify the information
|
|
||||
// associated with an assembly.
|
|
||||
[assembly: AssemblyTitle("Test")] |
|
||||
[assembly: AssemblyDescription("")] |
|
||||
[assembly: AssemblyConfiguration("")] |
|
||||
[assembly: AssemblyCompany("")] |
|
||||
[assembly: AssemblyProduct("Test")] |
|
||||
[assembly: AssemblyCopyright("Copyright © 2012")] |
|
||||
[assembly: AssemblyTrademark("")] |
|
||||
[assembly: AssemblyCulture("")] |
|
||||
|
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||
// to COM components. If you need to access a type in this assembly from
|
|
||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||
[assembly: ComVisible(false)] |
|
||||
|
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||
[assembly: Guid("34f4c859-67cc-40d2-97ae-27e8c7157052")] |
|
||||
|
|
||||
// Version information for an assembly consists of the following four values:
|
|
||||
//
|
|
||||
// Major Version
|
|
||||
// Minor Version
|
|
||||
// Build Number
|
|
||||
// Revision
|
|
||||
//
|
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
|
||||
// by using the '*' as shown below:
|
|
||||
[assembly: AssemblyVersion("1.0.0.0")] |
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|
||||
@ -1,103 +0,0 @@ |
|||||
(function ($) { |
|
||||
// http: //www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#attr-img-srcset
|
|
||||
|
|
||||
// Regexes for matching queries.
|
|
||||
var rSrc = /[^\s]+/, |
|
||||
rWidth = /(\d+)w/, |
|
||||
rRatio = /(\d+)x/; |
|
||||
|
|
||||
// Detect retina display
|
|
||||
// http: //www.quirksmode.org/blog/archives/2012/06/devicepixelrati.html
|
|
||||
var pixelRatio = (window.devicePixelRatio || 1); |
|
||||
|
|
||||
// Cache the images as theres no point querying them twice.
|
|
||||
var imageList = []; |
|
||||
|
|
||||
// http://lodash.com/docs/#debounce
|
|
||||
var debounce = function (func, wait, immediate) { |
|
||||
var args, |
|
||||
result, |
|
||||
thisArg, |
|
||||
timeoutId; |
|
||||
|
|
||||
function delayed() { |
|
||||
timeoutId = null; |
|
||||
if (!immediate) { |
|
||||
func.apply(thisArg, args); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return function () { |
|
||||
var isImmediate = immediate && !timeoutId; |
|
||||
args = arguments; |
|
||||
thisArg = this; |
|
||||
|
|
||||
clearTimeout(timeoutId); |
|
||||
timeoutId = setTimeout(delayed, wait); |
|
||||
|
|
||||
if (isImmediate) { |
|
||||
result = func.apply(thisArg, args); |
|
||||
} |
|
||||
return result; |
|
||||
}; |
|
||||
}; |
|
||||
|
|
||||
var getImgSrc = function (image) { |
|
||||
var imgSrc = null, imgWidth = 0, i, |
|
||||
imgSrcParts = image.attributes["srcset"].nodeValue.split(","), |
|
||||
len = imgSrcParts.length, |
|
||||
width = $(window).width(); |
|
||||
|
|
||||
for (i = 0; i < len; i += 1) { |
|
||||
|
|
||||
// This is just a rough play on the algorithm.
|
|
||||
var newImgSrc = imgSrcParts[i].match(rSrc)[0], |
|
||||
newImgWidth = rWidth.test(imgSrcParts[i]) ? parseInt(imgSrcParts[i].match(rWidth)[1], 10) : 1, // Use 1 for truthy
|
|
||||
newPixelRatio = rRatio.test(imgSrcParts[i]) ? parseInt(imgSrcParts[i].match(rRatio)[1], 10) : 1; |
|
||||
|
|
||||
if ((newImgWidth > imgWidth && width > newImgWidth && newPixelRatio === pixelRatio)) { |
|
||||
|
|
||||
imgWidth = newImgWidth || imgWidth; |
|
||||
imgSrc = newImgSrc; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
// Return null
|
|
||||
return imgSrc; |
|
||||
}; |
|
||||
|
|
||||
$(window).resize(function () { |
|
||||
|
|
||||
$.each(imageList, function () { |
|
||||
var self = this, |
|
||||
checkImage = function () { |
|
||||
var src = getImgSrc(self); |
|
||||
|
|
||||
if (src) { |
|
||||
self.src = src; |
|
||||
} |
|
||||
|
|
||||
}, |
|
||||
lazyCheck = debounce(checkImage, 100); |
|
||||
|
|
||||
// Run debounced
|
|
||||
lazyCheck(); |
|
||||
|
|
||||
}); |
|
||||
|
|
||||
}); |
|
||||
|
|
||||
$(window).load(function () { |
|
||||
$("img[srcset]").each(function () { |
|
||||
|
|
||||
var src = getImgSrc(this); |
|
||||
|
|
||||
if (src) { |
|
||||
this.src = src; |
|
||||
} |
|
||||
|
|
||||
imageList.push(this); |
|
||||
}); |
|
||||
}); |
|
||||
|
|
||||
} (jQuery)); |
|
||||
@ -1,246 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|
||||
<PropertyGroup> |
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
||||
<ProductVersion> |
|
||||
</ProductVersion> |
|
||||
<SchemaVersion>2.0</SchemaVersion> |
|
||||
<ProjectGuid>{30327C08-7574-4D7E-AC95-6A58753C6855}</ProjectGuid> |
|
||||
<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> |
|
||||
<OutputType>Library</OutputType> |
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|
||||
<RootNamespace>Test</RootNamespace> |
|
||||
<AssemblyName>Test</AssemblyName> |
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
|
||||
<MvcBuildViews>false</MvcBuildViews> |
|
||||
<UseIISExpress>false</UseIISExpress> |
|
||||
<FileUpgradeFlags> |
|
||||
</FileUpgradeFlags> |
|
||||
<UpgradeBackupLocation> |
|
||||
</UpgradeBackupLocation> |
|
||||
<OldToolsVersion>4.0</OldToolsVersion> |
|
||||
<IISExpressSSLPort /> |
|
||||
<IISExpressAnonymousAuthentication /> |
|
||||
<IISExpressWindowsAuthentication /> |
|
||||
<IISExpressUseClassicPipelineMode /> |
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> |
|
||||
<RestorePackages>true</RestorePackages> |
|
||||
<MvcProjectUpgradeChecked>true</MvcProjectUpgradeChecked> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
||||
<DebugSymbols>true</DebugSymbols> |
|
||||
<DebugType>full</DebugType> |
|
||||
<Optimize>false</Optimize> |
|
||||
<OutputPath>bin\</OutputPath> |
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<WarningLevel>4</WarningLevel> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
||||
<DebugType>pdbonly</DebugType> |
|
||||
<Optimize>true</Optimize> |
|
||||
<OutputPath>bin\</OutputPath> |
|
||||
<DefineConstants>TRACE</DefineConstants> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<WarningLevel>4</WarningLevel> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'All|AnyCPU'"> |
|
||||
<DebugSymbols>true</DebugSymbols> |
|
||||
<OutputPath>bin\</OutputPath> |
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
||||
<DebugType>full</DebugType> |
|
||||
<PlatformTarget>AnyCPU</PlatformTarget> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
</PropertyGroup> |
|
||||
<ItemGroup> |
|
||||
<Reference Include="Microsoft.CSharp" /> |
|
||||
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> |
|
||||
<SpecificVersion>False</SpecificVersion> |
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> |
|
||||
<SpecificVersion>False</SpecificVersion> |
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> |
|
||||
<SpecificVersion>False</SpecificVersion> |
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="System.Data.Entity" /> |
|
||||
<Reference Include="System.IO"> |
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.1.1.9\lib\net40\System.IO.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="System.Net" /> |
|
||||
<Reference Include="System.Runtime"> |
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.1.1.9\lib\net40\System.Runtime.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="System.Threading.Tasks"> |
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.1.1.9\lib\net40\System.Threading.Tasks.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> |
|
||||
<Reference Include="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> |
|
||||
<Reference Include="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> |
|
||||
<Reference Include="System" /> |
|
||||
<Reference Include="System.Data" /> |
|
||||
<Reference Include="System.Drawing" /> |
|
||||
<Reference Include="System.Web.DynamicData" /> |
|
||||
<Reference Include="System.Web.Entity" /> |
|
||||
<Reference Include="System.Web.ApplicationServices" /> |
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" /> |
|
||||
<Reference Include="System.Core" /> |
|
||||
<Reference Include="System.Data.DataSetExtensions" /> |
|
||||
<Reference Include="System.Xml.Linq" /> |
|
||||
<Reference Include="System.Web" /> |
|
||||
<Reference Include="System.Web.Extensions" /> |
|
||||
<Reference Include="System.Web.Abstractions" /> |
|
||||
<Reference Include="System.Web.Routing" /> |
|
||||
<Reference Include="System.Xml" /> |
|
||||
<Reference Include="System.Configuration" /> |
|
||||
<Reference Include="System.Web.Services" /> |
|
||||
<Reference Include="System.EnterpriseServices" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Compile Include="Controllers\HomeController.cs" /> |
|
||||
<Compile Include="Global.asax.cs"> |
|
||||
<DependentUpon>Global.asax</DependentUpon> |
|
||||
</Compile> |
|
||||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="Content\responsive.min.css" /> |
|
||||
<Content Include="Global.asax" /> |
|
||||
<Content Include="Scripts\img.srcsect.pollyfill.js" /> |
|
||||
<Content Include="Web.config"> |
|
||||
<SubType>Designer</SubType> |
|
||||
</Content> |
|
||||
<Content Include="Web.Debug.config"> |
|
||||
<DependentUpon>Web.config</DependentUpon> |
|
||||
</Content> |
|
||||
<Content Include="Web.Release.config"> |
|
||||
<DependentUpon>Web.config</DependentUpon> |
|
||||
</Content> |
|
||||
<Content Include="Views\_ViewStart.cshtml" /> |
|
||||
<Content Include="Views\Shared\_Layout.cshtml" /> |
|
||||
<Content Include="Views\Web.config" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Folder Include="App_Data\" /> |
|
||||
<Folder Include="Models\" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<ProjectReference Include="..\..\ImageProcessor.Web\NET4\ImageProcessor.Web_NET4.csproj"> |
|
||||
<Project>{4f7050f2-465f-4e10-8db2-2fb97ac6aa43}</Project> |
|
||||
<Name>ImageProcessor.Web_NET4</Name> |
|
||||
</ProjectReference> |
|
||||
<ProjectReference Include="..\..\ImageProcessor\ImageProcessor.csproj"> |
|
||||
<Project>{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}</Project> |
|
||||
<Name>ImageProcessor</Name> |
|
||||
</ProjectReference> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="Views\Home\Index.cshtml" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="config\imageprocessor\cache.config" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="config\imageprocessor\processing.config" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="config\imageprocessor\security.config" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="Views\Home\Bmp.cshtml" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="Views\Home\External.cshtml" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="Views\Home\Gif.cshtml" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="Views\Home\Png.cshtml" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="Views\Home\Png8.cshtml" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="Views\Home\Tiff.cshtml" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="packages.config" /> |
|
||||
</ItemGroup> |
|
||||
<PropertyGroup> |
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> |
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> |
|
||||
<DebugSymbols>true</DebugSymbols> |
|
||||
<OutputPath>bin\</OutputPath> |
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
||||
<DebugType>full</DebugType> |
|
||||
<PlatformTarget>x86</PlatformTarget> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> |
|
||||
<OutputPath>bin\</OutputPath> |
|
||||
<DefineConstants>TRACE</DefineConstants> |
|
||||
<Optimize>true</Optimize> |
|
||||
<DebugType>pdbonly</DebugType> |
|
||||
<PlatformTarget>x86</PlatformTarget> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'All|x86'"> |
|
||||
<DebugSymbols>true</DebugSymbols> |
|
||||
<OutputPath>bin\</OutputPath> |
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
||||
<DebugType>full</DebugType> |
|
||||
<PlatformTarget>x86</PlatformTarget> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /> |
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /> |
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|
||||
Other similar extension points exist, see Microsoft.Common.targets. |
|
||||
<Target Name="BeforeBuild"> |
|
||||
</Target> |
|
||||
<Target Name="AfterBuild"> |
|
||||
</Target> --> |
|
||||
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'"> |
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" /> |
|
||||
</Target> |
|
||||
<ProjectExtensions> |
|
||||
<VisualStudio> |
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> |
|
||||
<WebProjectProperties> |
|
||||
<UseIIS>False</UseIIS> |
|
||||
<AutoAssignPort>True</AutoAssignPort> |
|
||||
<DevelopmentServerPort>21961</DevelopmentServerPort> |
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath> |
|
||||
<IISUrl> |
|
||||
</IISUrl> |
|
||||
<NTLMAuthentication>False</NTLMAuthentication> |
|
||||
<UseCustomServer>False</UseCustomServer> |
|
||||
<CustomServerUrl> |
|
||||
</CustomServerUrl> |
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> |
|
||||
</WebProjectProperties> |
|
||||
</FlavorProperties> |
|
||||
</VisualStudio> |
|
||||
</ProjectExtensions> |
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> |
|
||||
<Target Name="AfterBuild"> |
|
||||
<Exec Command="xcopy "$(SolutionDir)Images" "$(ProjectDir)Images" /S /Y /I" /> |
|
||||
</Target> |
|
||||
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" /> |
|
||||
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''"> |
|
||||
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" /> |
|
||||
<Error Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" /> |
|
||||
</Target> |
|
||||
</Project> |
|
||||
@ -1,14 +0,0 @@ |
|||||
@{ |
|
||||
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> |
|
||||
@ -1,99 +0,0 @@ |
|||||
@{ |
|
||||
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> |
|
||||
@ -1,191 +0,0 @@ |
|||||
@{ |
|
||||
ViewBag.Title = "Home Page"; |
|
||||
} |
|
||||
<article> |
|
||||
<h1>Jpg</h1> |
|
||||
<section> |
|
||||
<div class="row"> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>Resized</h2> |
|
||||
<img src="/images/Penguins.jpg?width=300" /> |
|
||||
<h3>Foreign language test.</h3> |
|
||||
<img src="/images/udendørs.jpg?width=300" /> |
|
||||
<img src="/images/udendørs.jpg?preset=a&filter=comic" /> |
|
||||
</div> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>Cropped </h2> |
|
||||
<img src="/images/Penguins.jpg?crop=0-0-300-225" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
<section> |
|
||||
<div class="row"> |
|
||||
<h2>Reside Pad</h2> |
|
||||
<div class="col-s-4"> |
|
||||
<img src="/images/Penguins.jpg?width=300&height=500" /> |
|
||||
</div> |
|
||||
<div class="col-s-8"> |
|
||||
<img src="/images/udendørs.jpg?width=600&height=250" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
<section> |
|
||||
<div class="row"> |
|
||||
<h2>Resize Crop</h2> |
|
||||
<div class="col-s-4"> |
|
||||
<img src="/images/Penguins.jpg?width=300&height=500&mode=crop" /> |
|
||||
</div> |
|
||||
<div class="col-s-8"> |
|
||||
<img src="/images/udendørs.jpg?width=600&height=250&mode=crop" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
<section> |
|
||||
<div class="row"> |
|
||||
<h2>Resize Max</h2> |
|
||||
<div class="col-s-4"> |
|
||||
<img src="/images/Penguins.jpg?width=300&height=500&mode=max" /> |
|
||||
</div> |
|
||||
<div class="col-s-8"> |
|
||||
<img src="/images/udendørs.jpg?width=600&height=250&mode=max" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
<section> |
|
||||
<div class="row"> |
|
||||
<h2>Resize Stretch</h2> |
|
||||
<div class="col-s-4"> |
|
||||
<img src="/images/Penguins.jpg?width=300&height=500&mode=stretch" /> |
|
||||
</div> |
|
||||
<div class="col-s-8"> |
|
||||
<img src="/images/udendørs.jpg?width=600&height=250&mode=stretch" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
<section> |
|
||||
<h2>Filter</h2> |
|
||||
<div class="row"> |
|
||||
<div class="col-s-6"> |
|
||||
<h3>blackwhite</h3> |
|
||||
<img src="/images/Penguins.jpg?width=300&filter=blackwhite" /> |
|
||||
</div> |
|
||||
<div class="col-s-6"> |
|
||||
<h3>comic</h3> |
|
||||
<img src="/images/Penguins.jpg?width=300&filter=comic" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="row"> |
|
||||
<div class="col-s-6"> |
|
||||
<h3>lomograph</h3> |
|
||||
<img src="/images/Penguins.jpg?width=300&filter=lomograph" /> |
|
||||
</div> |
|
||||
<div class="col-s-6"> |
|
||||
<h3>greyscale</h3> |
|
||||
<img src="/images/Penguins.jpg?width=300&filter=greyscale" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="row"> |
|
||||
<div class="col-s-6"> |
|
||||
<h3>polaroid</h3> |
|
||||
<img src="/images/Penguins.jpg?width=300&filter=polaroid" /> |
|
||||
</div> |
|
||||
<div class="col-s-6"> |
|
||||
<h3>sepia</h3> |
|
||||
<img src="/images/Penguins.jpg?width=300&filter=sepia" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="row"> |
|
||||
<div class="col-s-6"> |
|
||||
<h3>gotham</h3> |
|
||||
<img src="/images/Penguins.jpg?width=300&filter=gotham" /> |
|
||||
</div> |
|
||||
<div class="col-s-6"> |
|
||||
<h3>hisatch</h3> |
|
||||
<img src="/images/Penguins.jpg?width=300&filter=hisatch" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="row"> |
|
||||
<div class="col-s-6"> |
|
||||
<h3>losatch</h3> |
|
||||
<img src="/images/Penguins.jpg?width=300&filter=losatch" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
<section> |
|
||||
<div class="row"> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>Watermark</h2> |
|
||||
<img src="/images/Penguins.jpg?width=300&watermark=text-This+is+a+long+body+of+copy+that+should+wrap|color-fff|size-24|style-italic|opacity-100|position-100-100|shadow-true|font-arial" /> |
|
||||
</div> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>Format</h2> |
|
||||
<img src="/images/Penguins.jpg?width=300&format=gif" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
<section> |
|
||||
<div class="row"> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>Rotate</h2> |
|
||||
<img src="/images/Penguins.jpg?width=300&rotate=angle-54|bgcolor-fff" /> |
|
||||
</div> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>Quality</h2> |
|
||||
<img src="/images/Penguins.jpg?width=300&quality=5" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
<section> |
|
||||
<div class="row"> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>Alpha</h2> |
|
||||
<img src="/images/Penguins.jpg?width=300&format=png&alpha=50" /> |
|
||||
</div> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>Remote</h2> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
<section> |
|
||||
<div class="row"> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>Flip - horizontal</h2> |
|
||||
<img src="/images/Penguins.jpg?width=300&flip=horizontal" /> |
|
||||
</div> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>Flip - vertical</h2> |
|
||||
<img src="/images/Penguins.jpg?width=300&flip=vertical" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
</article> |
|
||||
|
|
||||
|
|
||||
<article> |
|
||||
<h1>Color Profiles</h1> |
|
||||
@* <section> |
|
||||
<div class="row"> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>CMYK original jpg</h2> |
|
||||
<img src="/images/cmyk.jpg?" width="400" /> |
|
||||
</div> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>sRGB original jpg</h2> |
|
||||
<img src="/images/srgb.jpg?" width="400" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section>*@ |
|
||||
<section> |
|
||||
<div class="row"> |
|
||||
<div class="col-s-6"> |
|
||||
<h2>CMYK resized jpg</h2> |
|
||||
<img src="/images/cmyk.jpg?width=400" /> |
|
||||
</div> |
|
||||
|
|
||||
<div class="col-s-6"> |
|
||||
<h2>sRGB resized jpg</h2> |
|
||||
<img src="/images/srgb.jpg?width=400" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
</article> |
|
||||
@ -1,99 +0,0 @@ |
|||||
@{ |
|
||||
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> |
|
||||
@ -1,40 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html> |
|
||||
<head> |
|
||||
<meta charset="utf-8" /> |
|
||||
<title>@ViewBag.Title</title> |
|
||||
<link href="@Url.Content("~/Content/responsive.min.css")" rel="stylesheet" type="text/css" /> |
|
||||
<style type="text/css"> |
|
||||
nav[role="navigation"] ul { |
|
||||
padding: 0; |
|
||||
} |
|
||||
|
|
||||
nav[role="navigation"] li { |
|
||||
display: inline-block; |
|
||||
font-size: 2em; |
|
||||
margin-right: 1em; |
|
||||
} |
|
||||
</style> |
|
||||
</head> |
|
||||
<body> |
|
||||
<div class="container"> |
|
||||
<header> |
|
||||
<h1>ImageProcessor NET4</h1> |
|
||||
</header> |
|
||||
<nav role="navigation"> |
|
||||
<ul> |
|
||||
<li>@Html.ActionLink("Jpeg", "Index")</li> |
|
||||
<li>@Html.ActionLink("Gif", "Gif")</li> |
|
||||
<li>@Html.ActionLink("Png", "Png")</li> |
|
||||
<li>@Html.ActionLink("Png8", "Png8")</li> |
|
||||
<li>@Html.ActionLink("Bmp", "Bmp")</li> |
|
||||
<li>@Html.ActionLink("Tiff", "Tiff")</li> |
|
||||
<li>@Html.ActionLink("External", "External")</li> |
|
||||
</ul> |
|
||||
</nav> |
|
||||
<section> |
|
||||
@RenderBody() |
|
||||
</section> |
|
||||
</div> |
|
||||
</body> |
|
||||
</html> |
|
||||
@ -1,58 +0,0 @@ |
|||||
<?xml version="1.0"?> |
|
||||
|
|
||||
<configuration> |
|
||||
<configSections> |
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> |
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> |
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> |
|
||||
</sectionGroup> |
|
||||
</configSections> |
|
||||
|
|
||||
<system.web.webPages.razor> |
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> |
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage"> |
|
||||
<namespaces> |
|
||||
<add namespace="System.Web.Mvc" /> |
|
||||
<add namespace="System.Web.Mvc.Ajax" /> |
|
||||
<add namespace="System.Web.Mvc.Html" /> |
|
||||
<add namespace="System.Web.Routing" /> |
|
||||
</namespaces> |
|
||||
</pages> |
|
||||
</system.web.webPages.razor> |
|
||||
|
|
||||
<appSettings> |
|
||||
<add key="webpages:Enabled" value="false" /> |
|
||||
</appSettings> |
|
||||
|
|
||||
<system.web> |
|
||||
<httpHandlers> |
|
||||
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/> |
|
||||
</httpHandlers> |
|
||||
|
|
||||
<!-- |
|
||||
Enabling request validation in view pages would cause validation to occur |
|
||||
after the input has already been processed by the controller. By default |
|
||||
MVC performs request validation before a controller processes the input. |
|
||||
To change this behavior apply the ValidateInputAttribute to a |
|
||||
controller or action. |
|
||||
--> |
|
||||
<pages |
|
||||
validateRequest="false" |
|
||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" |
|
||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" |
|
||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> |
|
||||
<controls> |
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" /> |
|
||||
</controls> |
|
||||
</pages> |
|
||||
</system.web> |
|
||||
|
|
||||
<system.webServer> |
|
||||
<validation validateIntegratedModeConfiguration="false" /> |
|
||||
|
|
||||
<handlers> |
|
||||
<remove name="BlockViewHandler"/> |
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" /> |
|
||||
</handlers> |
|
||||
</system.webServer> |
|
||||
</configuration> |
|
||||
@ -1,30 +0,0 @@ |
|||||
<?xml version="1.0"?> |
|
||||
|
|
||||
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 --> |
|
||||
|
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
|
||||
<!-- |
|
||||
In the example below, the "SetAttributes" transform will change the value of |
|
||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator |
|
||||
finds an atrribute "name" that has a value of "MyDB". |
|
||||
|
|
||||
<connectionStrings> |
|
||||
<add name="MyDB" |
|
||||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" |
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/> |
|
||||
</connectionStrings> |
|
||||
--> |
|
||||
<system.web> |
|
||||
<!-- |
|
||||
In the example below, the "Replace" transform will replace the entire |
|
||||
<customErrors> section of your web.config file. |
|
||||
Note that because there is only one customErrors section under the |
|
||||
<system.web> node, there is no need to use the "xdt:Locator" attribute. |
|
||||
|
|
||||
<customErrors defaultRedirect="GenericError.htm" |
|
||||
mode="RemoteOnly" xdt:Transform="Replace"> |
|
||||
<error statusCode="500" redirect="InternalError.htm"/> |
|
||||
</customErrors> |
|
||||
--> |
|
||||
</system.web> |
|
||||
</configuration> |
|
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue