diff --git a/.vs/ImageEnlarger/v14/.suo b/.vs/ImageEnlarger/v14/.suo new file mode 100644 index 0000000..54d3efb Binary files /dev/null and b/.vs/ImageEnlarger/v14/.suo differ diff --git a/ImageEnlarger.sln b/ImageEnlarger.sln new file mode 100644 index 0000000..edba4bf --- /dev/null +++ b/ImageEnlarger.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.24720.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageEnlarger", "ImageEnlarger\ImageEnlarger.csproj", "{77D1D2B3-367E-421D-BA6C-13EB826AA747}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {77D1D2B3-367E-421D-BA6C-13EB826AA747}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77D1D2B3-367E-421D-BA6C-13EB826AA747}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77D1D2B3-367E-421D-BA6C-13EB826AA747}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77D1D2B3-367E-421D-BA6C-13EB826AA747}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/ImageEnlarger/App.config b/ImageEnlarger/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/ImageEnlarger/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ImageEnlarger/ImageEnlarger.csproj b/ImageEnlarger/ImageEnlarger.csproj new file mode 100644 index 0000000..44061c3 --- /dev/null +++ b/ImageEnlarger/ImageEnlarger.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {77D1D2B3-367E-421D-BA6C-13EB826AA747} + Exe + Properties + ImageEnlarger + ImageEnlarger + v4.5.2 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ImageEnlarger/Program.cs b/ImageEnlarger/Program.cs new file mode 100644 index 0000000..38771f3 --- /dev/null +++ b/ImageEnlarger/Program.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Drawing.Imaging; + +namespace ImageEnlarger +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Enter the full file path of your Eclipse configuration file:\n"); + var dir = @Console.ReadLine(); + var ext = new List { ".jpg", ".gif", ".png" }; + var myFiles = Directory.GetFiles(dir, "*.*", SearchOption.AllDirectories) + .Where(s => ext.Any(e => s.EndsWith(e))).ToList(); + + int height, width; + try { + Console.WriteLine("Enter Resize Height\t"); + height = int.Parse(Console.ReadLine()); + Console.WriteLine("Enter Resize Width\t"); + width = int.Parse(Console.ReadLine()); + } + catch + { + Console.WriteLine("You must enter a valid integer for Height and Width"); + Console.ReadLine(); + return; + } + int count = 1; + List missed = new List(); + foreach (string file in myFiles) + { + Console.Clear(); + Console.Write((((double)count++ / (double)myFiles.Count())*100).ToString("##.##") + "%"); + try + { + using (FileStream bitmapFile = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + { + Image loaded = new Bitmap(bitmapFile); + Bitmap b = ResizeImage(loaded, height, width); + b.Save("temp"); + } + + File.Delete(file); + + using (Image i = Bitmap.FromFile("temp")) + { + i.Save(file); + } + + File.Delete("temp"); + } + catch { missed.Add(file); } + } + Console.WriteLine("\nError resizing:\n"); + Console.WriteLine(string.Join("\n", missed)); + Console.ReadLine(); + } + /// + /// Resize the image to the specified width and height. + /// + /// The image to resize. + /// The width to resize to. + /// The height to resize to. + /// The resized image. + public static Bitmap ResizeImage(Image image, int width, int height) + { + var destRect = new Rectangle(0, 0, width, height); + var destImage = new Bitmap(width, height); + + destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution); + + using (var graphics = Graphics.FromImage(destImage)) + { + graphics.CompositingMode = CompositingMode.SourceCopy; + graphics.CompositingQuality = CompositingQuality.HighQuality; + graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; + graphics.SmoothingMode = SmoothingMode.HighQuality; + graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + + using (var wrapMode = new ImageAttributes()) + { + wrapMode.SetWrapMode(WrapMode.TileFlipXY); + graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode); + } + } + + return destImage; + } + } +} diff --git a/ImageEnlarger/Properties/AssemblyInfo.cs b/ImageEnlarger/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..dcf6402 --- /dev/null +++ b/ImageEnlarger/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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("ImageEnlarger")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ImageEnlarger")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("77d1d2b3-367e-421d-ba6c-13eb826aa747")] + +// 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 Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ImageEnlarger/bin/Debug/ImageEnlarger.exe b/ImageEnlarger/bin/Debug/ImageEnlarger.exe new file mode 100644 index 0000000..19eca03 Binary files /dev/null and b/ImageEnlarger/bin/Debug/ImageEnlarger.exe differ diff --git a/ImageEnlarger/bin/Debug/ImageEnlarger.exe.config b/ImageEnlarger/bin/Debug/ImageEnlarger.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/ImageEnlarger/bin/Debug/ImageEnlarger.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ImageEnlarger/bin/Debug/ImageEnlarger.pdb b/ImageEnlarger/bin/Debug/ImageEnlarger.pdb new file mode 100644 index 0000000..868e328 Binary files /dev/null and b/ImageEnlarger/bin/Debug/ImageEnlarger.pdb differ diff --git a/ImageEnlarger/bin/Debug/ImageEnlarger.vshost.exe b/ImageEnlarger/bin/Debug/ImageEnlarger.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/ImageEnlarger/bin/Debug/ImageEnlarger.vshost.exe differ diff --git a/ImageEnlarger/bin/Debug/ImageEnlarger.vshost.exe.config b/ImageEnlarger/bin/Debug/ImageEnlarger.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/ImageEnlarger/bin/Debug/ImageEnlarger.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ImageEnlarger/bin/Debug/ImageEnlarger.vshost.exe.manifest b/ImageEnlarger/bin/Debug/ImageEnlarger.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/ImageEnlarger/bin/Debug/ImageEnlarger.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/ImageEnlarger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ImageEnlarger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..35fe8c6 Binary files /dev/null and b/ImageEnlarger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ImageEnlarger/obj/Debug/ImageEnlarger.csproj.FileListAbsolute.txt b/ImageEnlarger/obj/Debug/ImageEnlarger.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..1609e40 --- /dev/null +++ b/ImageEnlarger/obj/Debug/ImageEnlarger.csproj.FileListAbsolute.txt @@ -0,0 +1,9 @@ +c:\users\mahowa\documents\visual studio 2015\Projects\ImageEnlarger\ImageEnlarger\bin\Debug\ImageEnlarger.exe.config +c:\users\mahowa\documents\visual studio 2015\Projects\ImageEnlarger\ImageEnlarger\obj\Debug\ImageEnlarger.csprojResolveAssemblyReference.cache +c:\users\mahowa\documents\visual studio 2015\Projects\ImageEnlarger\ImageEnlarger\bin\Debug\ImageEnlarger.exe +c:\users\mahowa\documents\visual studio 2015\Projects\ImageEnlarger\ImageEnlarger\bin\Debug\ImageEnlarger.pdb +c:\users\mahowa\documents\visual studio 2015\Projects\ImageEnlarger\ImageEnlarger\obj\Debug\ImageEnlarger.exe +c:\users\mahowa\documents\visual studio 2015\Projects\ImageEnlarger\ImageEnlarger\obj\Debug\ImageEnlarger.pdb +C:\Users\mahowa\Documents\Visual Studio 2015\Projects\ImageEnlarger\ImageUpscaler\ImageEnlarger\bin\Debug\ImageEnlarger.exe.config +C:\Users\mahowa\Documents\Visual Studio 2015\Projects\ImageEnlarger\ImageUpscaler\ImageEnlarger\obj\Debug\ImageEnlarger.exe +C:\Users\mahowa\Documents\Visual Studio 2015\Projects\ImageEnlarger\ImageUpscaler\ImageEnlarger\obj\Debug\ImageEnlarger.pdb diff --git a/ImageEnlarger/obj/Debug/ImageEnlarger.csprojResolveAssemblyReference.cache b/ImageEnlarger/obj/Debug/ImageEnlarger.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1e4a8ea Binary files /dev/null and b/ImageEnlarger/obj/Debug/ImageEnlarger.csprojResolveAssemblyReference.cache differ diff --git a/ImageEnlarger/obj/Debug/ImageEnlarger.exe b/ImageEnlarger/obj/Debug/ImageEnlarger.exe new file mode 100644 index 0000000..19eca03 Binary files /dev/null and b/ImageEnlarger/obj/Debug/ImageEnlarger.exe differ diff --git a/ImageEnlarger/obj/Debug/ImageEnlarger.pdb b/ImageEnlarger/obj/Debug/ImageEnlarger.pdb new file mode 100644 index 0000000..868e328 Binary files /dev/null and b/ImageEnlarger/obj/Debug/ImageEnlarger.pdb differ diff --git a/ImageEnlarger/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/ImageEnlarger/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/ImageEnlarger/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/ImageEnlarger/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/ImageEnlarger/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/ImageEnlarger/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/ImageEnlarger/packages.config b/ImageEnlarger/packages.config new file mode 100644 index 0000000..9fde524 --- /dev/null +++ b/ImageEnlarger/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/ImageResizer.4.0.5/ImageResizer.4.0.5.nupkg b/packages/ImageResizer.4.0.5/ImageResizer.4.0.5.nupkg new file mode 100644 index 0000000..90ea170 Binary files /dev/null and b/packages/ImageResizer.4.0.5/ImageResizer.4.0.5.nupkg differ diff --git a/packages/ImageResizer.4.0.5/lib/net45/ImageResizer.XML b/packages/ImageResizer.4.0.5/lib/net45/ImageResizer.XML new file mode 100644 index 0000000..ee1f74e --- /dev/null +++ b/packages/ImageResizer.4.0.5/lib/net45/ImageResizer.XML @@ -0,0 +1,5190 @@ + + + + ImageResizer + + + + + Generates the resized image to disk (if needed), then rewrites the request to that location. + Perform 404 checking before calling this method. Assumes file exists. + Called during PostAuthorizeRequest + + + + + + + + Represents the widths of edges of a box. + + + + + Create a box with all edges the same width. + + + + + + Create a box, specifying individual widths for each size + + + + + + + + + Copies the specified BoxEdges instance + + + + + + Sets the width of all edges, returning a new instance + + + + + + + Returns double.NaN unless all edges are the same width, in which case that width is returned + + + + + Returns an instance with a width of 0 + + + + + Returns true if th + + + + + Gets edge offsets as a clockwise array, starting with Top. + + + + + + Provides culture-invariant parsing of byte, int, double, float, bool, and enum values. + + + + + + + + Provides culture-invariant parsing of byte, int, double, float, bool, and enum values. + + + + + + + + + Provides culture-invariant parsing of byte, int, double, float, bool, and enum values. + + + + + + + + + Serializes the given value by calling .ToString(). If the value is null, the key is removed. + + + + + + + + + Provides culture-invariant serialization of value types, in lower case for querystring readability. Setting a key to null removes it. + + + + + + + + + SafeList is mutable, but it uses immutable data structures to minimize the need for locking. + The provided manipulation + Exposes a immutable list. Changes are made by copying the lists. + SafeList is + Never perform logic on SafeList directly, always use GetList() or GetCollection() first, followed by SetList(). + If you need involved list-fu, use ModifyList and specify a callback. It will execute inside a lock, preventing changes on other threads from overwriting each other. + + + + + + Returns an immutable snapshot of the collection + + + + + + Returns a mutable snapshot of the list + + + + + + Replaces the current collection with a new one. (copied to ensure safety) + Use ModifyList when modifying the list. Use this only when the previous or current state of the list is irrelevant. + + + + + + Adds the specified item to the end of the list + + + + + + Removes the item from the list + + + + + + Returns the first item in the list. May return null if the list is empty. + + + + + Returns the first item in the list. May return null if the list is empty. + + + + + Adds the specified item to the beginning of the list + + + + + + Allows a caller to perform logic on the list inside a lock, and return a modified list. + Callbacks should be fast, and should reference the IList they are fed, not this SafeList instance. + Calling methods on the SafeList instance will cause a deadlock. + + + + + + Returns true if the collection contains the specified item at the moment. + + + + + + + Extends enumerations by allowing them to define alternate strings with the [EnumString("Alternate Name",true)] attribute, and support it through TryParse and ToPreferredString + + + + + Attempts case-insensitive parsing of the specified enum. Returns the specified default value if parsing fails. + Supports [EnumString("Alternate Value")] attributes and parses flags. If any segment of a comma-delimited list isn't parsed as either a number or string, defaultValue will be returned. + + + + + + + + + Attempts case-insensitive parsing of the specified enum. Returns null if parsing failed. + Supports [EnumString("Alternate Value")] attributes and parses flags. If any segment of a comma-delimited list isn't parsed as either a number or string, null will be returned. + + + + + + + + Retuns the string representation for the given enumeration + + + + + + + + Provides culture-invariant parsing of int, double, float, bool, and enum values. + + + + + + + + + Provides culture-invariant parsing of int, double, float, bool, and enum values. + + + + + + + + + + Provides culture-invariant parsing of int, double, float, bool, and enum values. + + + + + + + + + + Provides culture-invariant parsing of int, double, float, bool, and enum values. + + + + + + + + + Serializes the given value by calling .ToString(). If the value is null, the key is removed. + + + + + + + + + + Provides culture-invariant serialization of value types, in lower case for querystring readability. Setting a key to null removes it. + + + + + + + + + + Parses a comma-delimited list of primitive values. If there are unparsable items in the list, they will be replaced with 'fallbackValue'. If fallbackValue is null, the function will return null + + + + + + + + + + Returns true if any of the specified keys contain a value + + + + + + + + Normalizes a command that has two possible names. + If either of the commands has a null or empty value, those keys are removed. + If both the primary and secondary are present, the secondary is removed. + Otherwise, the secondary is renamed to the primary name. + + + + + + + + Creates and returns a new NameValueCollection instance that contains only the specified keys from the current collection. + + + + + + + + Creates and returns a new NameValueCollection instance that contains all of the + keys/values from 'q', and any keys/values from 'defaults' that 'q' does not already + contain. + + The settings specific to a particular query + Default settings to use when not overridden by 'q'. + + + + + Provides extension methods for copying streams + + + + + Copies the remaining data in the current stream to a new MemoryStream instance. + + + + + + + Copies the current stream into a new MemoryStream instance. + + + True to copy entire stream if seeakable, false to only copy remaining data + + + + + Copies the current stream into a new MemoryStream instance. + + + True to copy entire stream if seeakable, false to only copy remaining data + The buffer size to use (in bytes) if a buffer is required. Default: 4KiB + + + + + Copies the remaining data in the current stream to a byte[] array of exact size. + + + + + + + Copies the current stream into a byte[] array of exact size. + + + True to copy entire stream if seeakable, false to only copy remaining data + + + + + Copies the remaining data from the this stream into the given stream. + + + The stream to write to + + + + Copies this stream into the given stream + + + The stream to write to + True to copy entire stream if seeakable, false to only copy remaining data + + + + Copies this stream into the given stream + + + The stream to write to + True to copy entire stream if seeakable, false to only copy remaining data + True to copy entire stream if seeakable, false to only copy remaining data + + + + Can return null if MemoryStream doesn't permit access to internal buffer. + + + + + + + + Copies the current stream into a byte[] array of exact size + + + True to copy entire stream if seeakable, false to only copy remaining data. + The buffer size to use (in bytes) if a buffer is required. Default: 4KiB + + + + + Copies the current stream into a byte[] array of exact size + + + True to copy entire stream if seeakable, false to only copy remaining data. + The buffer size to use (in bytes) if a buffer is required. Default: 4KiB + + + + + Attempts to return a byte[] array containing the remaining portion of the stream. + Unlike CopyToBytes(), does not return a byte[] array of exact length, and may re-use the actual Stream's byte array, making it unsafe to write to in the future. + + + + + + + + + + Creates a 'gatherer' that pulls issues from IIssueProviders throughout the Config structure. Even plugins are queried. + + + + + + Security and stability issues. + + + + + Behavioral issues, such as having no registered image encoders + + + + + Errors in the module configuration + + + + + Non-optimal settings + + + + + Returns a copy of the list of reported issues. + + + + + + Adds the specified issue to the list unless it is an exact duplicate of another instance. + + + + + + Writes the diagnostic message at the specified level. + + The log level. + A to be written. + + + + Writes the diagnostic message at the Trace level. + + A to be written. + + + + Writes the diagnostic message at the Debug level. + + A to be written. + + + + Writes the diagnostic message at the Info level. + + A to be written. + + + + Writes the diagnostic message at the Warn level. + + A to be written. + + + + Writes the diagnostic message at the Error level. + + A to be written. + + + + Writes the diagnostic message at the Fatal level. + + A to be written. + + + + Checks if the specified log level is enabled. + + The log level. + A value indicating whether the specified log level is enabled. + + + + Gets a value indicating whether the Trace level is enabled. + + + + + Gets a value indicating whether the Debug level is enabled. + + + + + Gets a value indicating whether the Info level is enabled. + + + + + Gets a value indicating whether the Warn level is enabled. + + + + + Gets a value indicating whether the Error level is enabled. + + + + + Gets a value indicating whether the Fatal level is enabled. + + + + + Gets or sets the logger name. + + + + + Loads NLog configuration from the specified file. + + The name of the file to load NLog configuration from. + + + + Creates the specified logger object and assigns a LoggerName to it. + + Logger name. + The new logger instance. + + + + Provides automatic download of native dependencies (which VS doesn't see). Gets the correct bitness as well - very nice if you're changing app pool bitness and forgot to change binaries. + + + + + Thread safe countdown class + + + + + Gets the current (app-wide) config instance. + + + + + + Access and modify plugins + + + + + Access and modify settings related to the HttpModule pipline. Register URL rewriting hooks, etc. + + + + + Allows subclasses to be used instead of ImageBuilder. Replacements must override the Create method and call their own constructor instead. + + + + + + Returns a shared instance of ImageManager, (or a subclass if it has been upgraded). + Instances change whenever ImageBuilderExtensions change. + + + + + + Shortuct to CurrentImageBuilder.Build (Useful for COM clients). Also creates a destination folder if needed, unlike the normal .Build() call. + + + + + + + + + The ResizeConfigrationSection is not thread safe, and should not be modified + Dynamically loads the ResizerSection from web.config when accessed for the first time. + If the resizer node doesn't exist, an empty configuration object is created with just the root resizer node. + + + + + Returns a list of all issues reported by the resizing core, as well as by all the plugins + + + + + Returns a deep copy of the specified node + + + + + + Returns a deep copy if the current state of the configuration tree (starting with the 'resizer' element as the root) + + + + + Replaces the configuration tree with the specified alternative + + + + + + Replaces the configuration tree with the specified alternative + + + + + + Writes a diagnostic page to the specified physical path + + + + + + Returns a string of the diagnostics page + + + + + + Domain-relative path which also includes the path info portion. I.e, '/app/folder/file.aspx/path/info' could be a valid value. Relative to the domain root, not the site or app root. + + + + + Populates the cache if it is empty. Not thread safe. + + + + + Returns a unqiue copy of the image extensions supported by the pipeline. Performs a cached query to all registered IQuerystringPlugin instances. + Use IsAcceptedImageType for better performance. + + + + + Returns a unqiue copy of all querystring keys supported by the pipeline. Performs a cached query to all registered IQuerystringPlugin instances. + Use HasPipelineDirective for better performance. (binary search) + + + + + The specified path must not include a querystring. Slashes, spaces, question marks, ampersands, and colons are not permitted in the extension. + If it contains a multipart extension like .txt.zip, only "zip" will be recognized. Must contain a dot - passing in "jpg" will fail. + + + + + + + Returns true if any of the querystring keys match any of the directives supported by the pipeline (such as width, height, format, bgcolor, etc) + + + + + + + Cached access to pipeline.fakeExtensions + + + + + Removes the first fake extensionm detected at the end of 'path' + + + + + + + Returns the value of Context.Items["resizer.newPath"] if present. If not, returns FilePath + PathInfo. + Sets Context.Items["resizer.newPath"]. + Only useful during the Pipeline.PostAuthorizeRequestStart event. + + + + + Returns the modified query string. If never set, returns a copy of Request.QueryString. + Returns the same instance if called multiple times. Copy it if you want to make changes without causing issues. + + + + + Get or sets whether the file extension check should be applied to the current request. Defaults to true. + If set to true, will only affect the current request, and will only cause the Resizer to evaluate the rewriting rules on the request. + Processing may still not occur if no querystring values are specified. Add 'cache=always' to force caching to occur. + + + + + Returns true if the current request is being processed and/or cached by the pipeline. + Will return false until *after* the FileExists method is called on the VirtualPathProviders, which is after the + AuthorizeImage event fires. + This will return a usable value if used from VirtualFile.Open(), or if used inside the PreHandleImage event or later. + + + + + Returns an IVirtualFileAsync instance if the specified file can be provided by an async provider + + + + + + + + Returns either an IVirtualFile instance or a VirtualFile instance. + + + + + + + + Returns true if (a) A registered IVirtualImageProvider says it exists, or (b) if the VirtualPathProvider chain says it exists. + + + + + + + + Fired once, on the first PostAuthorizeRequest event. + + + + + Fires during the PostAuthorizeRequest phase, prior to any module-specific logic. + Executes for every request to the website. Use only as a last resort. Other events occur only for image requests, and thus have lower overhead. + + + + + Fired during PostAuthorizeRequest, after ResizeExtension has been removed. + On fired on requests with extensions that match supported image types. + + You can add additonal supported image extentions by registering a plugin that implementes IQuerystringPlugin, or you can add an + extra extension in the URL and remove it here. Example: .psd.jpg + + + + + Fired during PostAuthorizeRequest, after Rewrite. + Any changes made here (which conflict) will be overwritten by the current querystring values. I.e, this is a good place to specify default settings. + Only fired on accepted image types. (see Rewrite) + + + + + Fired after all other rewrite events. + Only fired on accepted image types. (see Rewrite) + + + + + Fired after all rewriting is finished. + e.AllowAccess defaults to the result of the UrlAuthorization module's verdict. It can be changed. + Set e.AllowAccess to true to cause and 403 Access Dened result. + + + + + Fired when the specified image doesn't exist. Only called for images that would normally be processed. + May be called during PostAuthorizeRequest or later - End the request completely with a redirect if you want alternate behavior. + + + + + Fired immediately before the image request is sent off to the caching system for proccessing. + Allows modification of response headers, caching arguments, and callbacks. + + + + + The number of images processed by this pipeline. + + + + + Cache selection occurs as follows: (1) The first registered CachingSystem that returns true from .CanProcess() is the default + (2) The SelectCachingSystem event is fired, allowing handlers to modify the selected cache. + This method may return null. + + + + + + + + True once the InterceptModule or InterceptModuleAsync has been installed and is intercepting requests. + + + + + True if the InterceptModuleAsync has been installed. Null if we can't find out. + + + + + Returns true if the AppDomain has Unrestricted code access security + + + + + + If true, AuthorizeImage will be called for all image requests, not just those with command directives. + + + + + If specified, DropQuerystringKeys will cause certain query string parameters to be excluded from processing. + + + + + True if the specified extension is one that the pipeline can handle + + + + + + + True if the querystring contains any directives that are understood by the pipeline + + + + + + + The key in Context.Items to store the modified querystring (i.e, post-rewrite). + Allows VirtualPathProviders to access the rewritten data. + + + + + The key in Context.Items to store the IResponseArgs object + + + + + The key in Context.Items to set if we want to cancel MVC routing for the request + + + + + The key in Context.Items to access a the path to use instead of Request.path + + + + + The behavior to use when accessing the file system. + + + + + Get or sets whether the file extension check should be applied to the current request. Defaults to true. + If set to true, will only affect the current request, and will only cause the Resizer to evaluate the rewriting rules on the request. + Processing may still not occur if no querystring values are specified. Add 'cache=always' to force caching to occur. + + + + + True once the InterceptModule has been installed. + + + + + True if we know that InterceptModuleAsync is registered. Null if we don't know. + + + + + Returns the value of Context.Items["resizer.newPath"] if present. If not, returns FilePath + PathInfo. + Sets Context.Items["resizer.newPath"]. + Only useful during the Pipeline.PostAuthorizeRequestStart event. + + + + + Removes the first fake extension detected at the end of 'path' (like image.jpg.ashx -> image.jpg). + + + + + + + Returns an ImageBuilder instance to use for image processing. + + + + + + Returns a ICacheProvider instance that provides caching system selection and creation. + + + + + + Returns an IVirtualFile instance if the specified file exists. + + + + + + + + Returns an IVirtualFileAsync instance if the specified file can be provided by an async provider + + + + + + + + Returns true if (a) A registered IVirtualImageProvider says it exists, or (b) if the VirtualPathProvider chain says it exists. + + + + + + + + Returns true if any registered IVirtualImageProviderAsync says it exists. + + + + + + + + If true, AuthorizeImage will be called for all image requests, not just those with command directives. + + + + + Provides thread-safe access to plugin addition, removal, and querying methods + + + + + Creates a new plugin config section, attached to the specified parent + + + + + + Processes the <plugins> section if they are not already loaded. Thread safe. + Only executes once. + + + + + Forces loading of the plugins specified in configuration, even if they have already been loaded. Will add duplicate plugins and throw exceptions if you do not call RemoveAll() first. + + + + + Returns true if the <plugins> section has been processed + + + + + Not thread safe. Performs actual work. + + + + + Returns the subset of installed plugins which implement the specified type or interface + + + + + + + Returns all registered instances of the specified plugins + + + + + + + Returns true if at least one plugin of the specified type is registered. + + + + + + + Returns true if 1 or more instances of the type are registered. + + + + + + + Returns the first registerd instance of the specified plugin. For IMultiInstancePlugins, use GetAll() + + + + + + + Returns the first registered instance of the specified plugin, or creates a new instance if the plugin isn't installed. + + + + + + + Returns the first registered instance of the specified plugin, or installs the given instance instead, then re-tries the query + + + + + + + + Installs the specified plugin, returning the plugin instance. + Convenience method, same as plugin.Install(Config.Current). + + + + + + + Attempts uninstallation of the specified plugin, returning true if successful. + Convenience method, same as plugin.Uninstall(Config.Current). + + + + + + + Currently registered ICurrentConfigProviders. + + + + + Currently registered set of ImageBuilderExtensions. + + + + + Currently registered IEncoders. + + + + + Currently registered ICache instances + + + + + Plugins which accept querystring arguments are registered here. + + + + + Plugins which accept new file extensions (in the url) are registered here. + + + + + Plugins which provide virtual files are registered here. + + + + + Plugins which modify image processing settings. + + + + + All plugins should be registered here. Used for diagnostic purposes. + + + + + Returns the most recently registered Logging plugin, or null. + + + + + Returns an instance of the first encoder that claims to be able to handle the specified settings. + Returns null if no encoders are available. + + Request settings, like format, quality, colors, dither, etc. + May be a Drawing.Image instance, a path, or null. To provide both, set Image.tag to the path. Helps the encoder detect the original format if the format was not specified. + May also be used for palette generation hinting by some encoders. + + + + + Returns null on failure. Check GetIssues() for causes. + + + + + + + + This is called to get a sorted list of plugins based on their likelyhood of having the plugin. + + + + + + + + Searches all loaded assemblies for the specified type, applying rules and prefixes to resolve the namespace and assembly. + Returns null if it could not find the type, and logs an issue. + + + + + + + For use only by plugins during .Uninstall. + Removes the specified plugin from AllPlugins, QuerystringPlugins, CachingSystems, ImageEncoders, and ImageBuiderExtensions, based + on which interfaces the instance implements. + Plugins may register event handlers and modify settings - thus you should use the plugin's method to uninstall them vs. using this method. + + + + + + Only for use by plugins during IPlugin.Install. Call Plugin.Install instead of this method, since plugins often must perform other initialization actions. + Adds the specified plugin to AllPlugins, QuerystringPlugins, CachingSystems, ImageEncoders, and ImageBuiderExtensions, based + on which interfaces the instance implements. For ICache and IEncoder, the plugin is inserted at the beginning of CachingSystems and ImageEncoders respectively. + To reiterate, plugins may register event handlers and modify settings - thus you should use the plugin's method to uninstall them vs. using this method. + Will not register a plugin that is already installed, unless it implementes IMultiInstancePlugin. + + + + + + Removes all plugins, of every kind. Logs any errors encountered. (Not all plugins support uninstallation) + + + + + No support for namespaces, no intention of eventual serialization. + Everything is case-insensitive, but preserves case. Not thread safe. + + + + + Builds a tree of Nodes from the specified XML subtree. Duplicate attributes are sent to 'ir' + + + + + + + Attributes + + + + + Access attributes by name + + + + + + + The concatenated text, significant whitespace, and entity references within this element. + Not XML compliant for sure. + + + + + The name of the element. + + + + + Child nodes + + + + + Returns the subset of Children with a matching element name. (Case-insensitive) + + + + + + + Queryies the subtree for the specified attribute on the specified element. Example selector: element.element.attrname + Assumes that the last segment of the selector is an attribute name. + Throws an ArgumentException if there is only one segment ( element ). + Uses the cache. + + + + + + + Sets the specified attribute value, creating parent elements if needed. Clears the query cache. + + + + + + + Sets the specified attribute value, creating parent elements if needed. Clears the query cache. + + + + + + + + Traverses the specified path, creating any missing elements along the way. Uses existing nodes if found. + + + + + + + Same as query(), except results are cached until clearQueryCache() is called. + Faster, but can be incorrect if existing nodes are renamed, moved, or deleted. + + + + + + + Makes a recusive copy of the subtree, keeping no duplicate references to mutable types. + + + + + + Returns true if the element has neither attributes nor children. + + + + + Encapsulates a node/attribute selection query, such as "node.node.attribute" + + + + + Returns a subset of the list starting at the specified index + + + + + + + If this occurs, no data is available. The request is not for us to interfere with. + + + + + Authorization was denied. The user should be shown a 403. + + + + + Refer to RewrittenQueryHasDirective, ProcessingIndicated, CachingIndicated, RewrittenMappedPath, in order to decide what to do. + + + + + Creates a route that matches any request where context.Items[contextItemsFlag] is (non-null). + + + + + + Implements IHttpHandler, serves content for the NoCache plugin + + + + + We duplicate efforts in PostRewrite to ensure that the DiskCache doesn't block configuration changes. + This won't help CloudFront, however. + + + + + + + + The default scale mode to use when 'width' and/or 'height' are used, and mode is not 'max'. + + + + + The default scale mode to use when 'maxwidth' and/or 'maxheight' are used (or mode=max). + + + + + Matches /resize(x,y,f)/ syntax + Fixed Bug - will replace both slashes.. make first a lookbehind + + + + + Parses and removes the resize folder syntax "resize(x,y,f)/" from the specified file path. + Places settings into the referenced querystring + + + The collection to place parsed values into + + + + + Causes IE6 and earlier to use GIF versions of PNG files. + By default, only fixes requests with ?iefix=true in the querystring. + When catchall is enabled, it will filter all png images, unless iefix=false on those requests. + Not compatible with CDNs or proxy servers, as they do not allow varying by user agent reliably. + + + + + If true, 'iefix=true' will be the default for all PNG images, instead of 'iefix=false'. + + + + + If true, the requests from IE will be HTTP redirected to new URLs. If false, the GIF will be silently served instead of the PNG, without any redirection. + A CDN or caching proxy will mess things up regardless, but using redirection ensures that the CDN/proxy never caches the GIF version instead of the PNG. + + + + + Returns true if the specified querystring and file will cause a PNG file to be returned. + + + + + + + Returns true if the user agent string specifies MSIE versions 1 through 6 for Windows. Cached in context.Items after first call. + + + + + + + Adds URL syntax support for legacy projects: + http://webimageresizer.codeplex.com/, + http://imagehandler.codeplex.com/, + http://bbimagehandler.codeplex.com/, + DAMP: http://our.umbraco.org/projects/backoffice-extensions/digibiz-advanced-media-picker, + Support for http://bip.codeplex.com/ and http://dynamicimageprocess.codeplex.com/ urls is default since w/h are supported. + + + + + Provides default client-caching behavior. Sends Last-Modified header if present, and Expires header if <clientcache minutes="value" /> is configured. + Also defaults Cache-control to Public for anonymous requests (and private for authenticated requests) + + + + + Allows gradients to be dynamically generated like so: + /gradient.png?color1=white&color2=black&angle=40&width=20&height=100 + + + + + Redirects image 404 errors to a querystring-specified server-local location, + while maintaining querystring values (by default) so layout isn't disrupted. + + + + The image to use in place of missing images can be specified by the "404" + parameter in the querystring. The "404" value can also refer to a named + value in the <plugins>/<Image404> setting in Web.config. + + + + + Using <img src="missingimage.jpg?404=image.jpg&width=200" /> + with the default setting (<image404 baseDir="~/" />) will + redirect to ~/image.jpg?width=200. + + + You may also configure 'variables', which is the recommended approach. + For example, <image404 propertyImageDefault="~/images/nophoto.png" /> + in the config file, and <img src="missingimage.jpg?404=propertyImageDefault&width=200" /> + will result in a redirect to ~/images/nophoto.png?width=200. + Any querystring values in the config variable take precedence over + querystring values in the image querystring. For example, + <image404 propertyImageDefault="~/images/nophoto.png?format=png" /> + in the config file and + <img src="missingimage.jpg?format=jpg&404=propertImageDefault&width=200" /> + will result in a redirect to ~/images/nophoto.png?format=png&width=200. + + + + + + Implements IHttpHandler, serves content for the NoCache plugin + + + + + Default cache when DiskCache isn't installed. + Useful for debugging purposes but unsuited for production use, and will use large quanities of RAM. (Scales to fewer than 5 concurrent requests). + Serves content directly to the client from memory. + + + + + Installs the caching system as the first choice. + + + + + + + Removes the plugin. + + + + + + + Sends the response directly to the client with no caching logic. + + + + + + + Adds drop shadow capabilities (shadowColor, shadowOffset, and shadowWidth commands) + + + + + Draws a gradient around the specified polygon. Fades from 'inner' to 'outer' over a distance of 'width' pixels. + + + + + + + + + + Returns an new NameValueCollection instance that only includes the "preset" and ("hmac" and "urlb64", if specified) querystring pairs from the specified instance. + + + + + + + + If true, the plugin will block all commands except those specified in a preset, and the &preset command itself. + Only applies to InterceptModule (the URL API). Does not apply to ImageBuilder.Build calls. To replicate the behavior, simply prevent any querystring keys except 'preset' from being passed to ImageBuilder.Build. + + + + + Can be used by plugins to implement 'trial version' functionality. Not currently used. + + + + + The Trial plugin cannot be removed using this method. + + + + + + + Determines when the diagnostics page can be viewed. + + + + + Diagnostics are disabled + + + + + Only local requests can access diagnostics + + + + + All hosts can view diagnostics. + + + + + Provides the incredibly helpful /resizer.debug page we all love. + + Mimics the behavior of customErrors by default. Not available if CustomErrors=true or retail=true. Available only to localhost if customErrors=RemoteOnly. + Can be overriden by adding in the <resizer> section <diagnostics enableFor="None|AllHosts|LocalHost" /> + + + + + + True if diagnostics can be displayed to the current user. + If <diagnostics enableFor="None" />, returns false. + If <diagnostics enableFor="Localhost" />, returns false for remote requests + If <diagnostics enableFor="AllHosts" />, returns true. + If unspecified, uses the same behavior as ASP.NET Custom Errors. + + + + + + + Returns the ASP.NET trust level + + + + + + Provides basic encoding functionality for Jpeg, png, and gif output. Allows adjustable Jpeg compression, but doesn't implement indexed PNG files or quantized GIF files. + + + + + If you set this to anything other than Gif, Png, or Jpeg, it will throw an exception. Defaults to Jpeg + + + + + Returns true if the this encoder supports the specified image format + + + + + + + 0..100 value. The Jpeg compression quality. 90 is the best setting. Not relevant in Png or Gif compression + + + + + Writes the specified image to the stream using Quality and OutputFormat + + + + + + + Returns true if the desired output type supports transparency. + + + + + Returns the default mime-type for the OutputFormat + + + + + Returns the default file extesnion for OutputFormat + + + + + Tries to parse an ImageFormat from the settings.Format value. + If an unrecogized format is specified, returns null. + If an unsupported format is specified, it is returned. + If *no* format is specified, returns defaultValue. + + + + + + + + Attempts to determine the ImageFormat of the source image. First attempts to parse the path, if a string is present in original.Tag. (or if 'original' is a string) + Falls back to using original.RawFormat. Returns null if both 'original' is null. + RawFormat has a bad reputation, so this may return unexpected values, like MemoryBitmap or something in some situations. + + The source image that was loaded from a stream, or a string path + + + + + Returns the ImageFormat enumeration value based on the extension in the specified physical path. Extensions can lie, just a guess. + + + + + + + Returns an string instance from the specfied ImageFormat. First matching entry in imageExtensions is used. + Returns null if not recognized. + + + + + + + Returns a dict of (lowercase invariant) image extensions and ImageFormat values + + + + + Returns an ImageFormat instance from the specfied file extension. Extensions lie sometimes, just a guess. + returns null if not recognized. + + + + + + + NOT thread-safe! + + + + + + + Supports Png, Jpeg, Gif, Bmp, and Tiff. Throws a ArgumentOutOfRangeException if not png, jpeg, gif, bmp, or tiff + + + + + + + Returns the first ImageCodeInfo instance with the specified mime type. Returns null if there are no matches. + + + + + + + Saves the specified image to the specified stream using jpeg compression of the specified quality. + + + A number between 0 and 100. Defaults to 90 if passed a negative number. Numbers over 100 are truncated to 100. + 90 is a *very* good setting. + + + + + + Saves the image in png form. If Stream 'target' is not seekable, a temporary MemoryStream will be used to buffer the image data into the stream + + + + + + + Returns the querystring keys used by DefaultEncoder (quality, format, and thumbnail) + + + + + + Returns signatures for jpeg, bmp, gif, png, wmf, ico, and tif + + + + + + Implements app-wide size Limits on image size + + + + + The image and total size limits + + + + + Enforces two kinds of maximum size constraints: a Total size limit, and an Image size limit. + Image limits do not include padding, border, or effect widths, and automatically shrink the 'width/height/maxwidth/maxheight' values to fit within the limits. + Total limits are absolute and apply to the actual result dimensions, causing an exception if they are exceeded. + Limits are checked during the layout phase, prior to resource-intensive bitmap operations. + + + + + The maximum final size an image generated by ImageBuilder can be. + Defaults to 3200x3200 + + + + + What action to take when the total size of the final image would exceed the TotalSize value. + Defaults to ThowException + + + + + Returns true if ImageSize is specified. + + + + + The maximum size an un-rotated image can be drawn when creating a resized image. + Rotation will increase the total size, as will any borders, paddings, margins, or + effects. Not effective at preventing attacks, use totalSize. + If larger values are specified in a querystring, they will automatically + be scaled to fit within these dimensions. + Defaults to 0x0, which means no limits + + + + + Functions exactly like an IIS virtual folder, but doesn't require IIS configuration. + + + + + True if the provider attempted to register itself as a VirtualPathProvider and failed due to limited security clearance. + False if it did not attempt (say, due to missing IOPermission) , or if it succeeded. + + + + + If true, the plugin will attempt to register itself as an application-wide VirtualPathProvider instead of a image resizer-specific IVirtualImageProvider. + + + + + The virtual path served by the VirtualFolder + + + + + The physical path + + + + + Registers the VirtualFolder plugin as a virtual path provider. + + + + + + True if the plugin has detected it doesn't have sufficient IOPermission to operate. + + + + + Converts relative and app-relative paths to domain-relative virtual paths. + + + + + + + Attempts to convert a phyiscal path into a collapsed rooted physical path. + + + + + + + Collapses any .. segments + + + + + + + Converts any virtual path in this folder to a physical path. Returns null if the virtual path is outside the folder. + + + + + + + Returns true if the specified path is inside this virtual folder + + + + + + + Returns true if (a) we have IOPermission, (b) the path is under our prefix, (c) the + expected physical file does not exist (because we shouldn't interfere in that case), and + (d) the other VPPs don't believe the file exists. + + + + + + + Returns the LastWriteTimeUtc value for the specified virtual file in this folder, or DateTime.MinValue if missing. + + + + + + + Returns true if the file exists in this virtual folder, and would not be masking an existing file. + Returns false if NoIOPermission is true. + + + + + + + + Unless the path is not within the virtual folder, or IO permissions are missing, will return an IVirtualFile instance for the path. + The file may or may not exist. + + + + + + + + For internal use only by the .NET VPP system. + + + + + + + For internal use only by the .NET VPP system. + + + + + + + For internal use only by the .NET VPP system. + + + + + + + + + Encapsulates a response plan for responding to a request. + + + + + A virtual file to support IVirtualImageProvider + + + + + Returns an opened stream to the file contents. + + + + + + Implement this if you are caching files provided by a virtual image provider (For example, remote or s3-hosted images). + + + + + Returns a cached copy of virtual file if it is cached, and if caching is desired. + + + + + + + + + Always implement this if possible. Allows caching systems to detect changes to source files and invalidate cached data properly. + + + + + The modified (last write time) of the source file, in UTC form. + + + + + Implement this to allow ImageResizer to access your custom blob store + + + + + Returns true if the specified request should be handled by this virtual image provider + + + + + + + + Returns a virtual file instance for the specified path and querystring. + + + + + + + + Allows IVirtualImageProviders to expose access through the ASP.NET VirtualPathProvider system. + + + + + Converts relative and app-relative paths to domain-relative virtual paths. + + + + + + + Allows multi-tenancy support. The 'root' config only needs one plugin, which implements this interface. + + + + + Returns a Config instance appropriate for the current request. If null is returned, the default/root instance will be used. + Implementations MUST return the same instance of Config for two identical requests. Multiple Config instances per tenant/area will cause problems. + MUST be thread-safe, concurrent calls WILL ocurr, and WILL occur during initial call. + + + + + + Provides a place to cache/store licenses. Only responsible for licenses used by plugins attached to the current Config instance. + + + + + Returns a collection containing all licenses for the plugin's Config instance, in their native form + + + + + + Permits plugins to redact data from the diagnostics page, like passwords + + + + + This interface has nothing to do with output caching. This allows VirtualFile instances to override the default cache key (.VirtualPath) for source caching of VirtualFile instances. + See IVirtualFileCache + + + + + Implement this if you are caching files provided by a virtual image provider (For example, remote or s3-hosted images). + + + + + Returns a cached copy of virtual file if it is cached, and if caching is desired. + + + + + + + + + For plugins that add support for new source file image extensions. + + + + + If the plugin adds support for new file extensions (such as "psd"), they should be returned by this method. + + + + + + Tag your plugin with this interface if it supports having multiple instances registered at once + + + + + All plugins must implement this. Enables web.config addition and removal. + + + + + Installs the plugin in the specified Config instance. The plugin must handle all the work of loading settings, registering the plugin etc. + + + + + + + Uninstalls the plugin. Should reverse all changes made during Install + + + + + + + Provides a way to modify settings before they reach the managed API. Does not execute early enough to affect disk caching, although that may change in a later version. + + + + + Implementations should support being called on their own result multiple times without behavioral differences. Currently only executed in the managed API, too late to affect the disk cache, but that will probably change (it's likely all ISettingsModifiers will get executed twice, once after PostRewrite and once before the managed API executes). + + + + + + + Wraps a standard ASP.NET VirtualFile instance in an IVirtualFile-compatible wrapper. + + + + + The VirtualFile instance this class is wrapping + + + + + For plugins that access the query string (important!) + + + + + If the plugin reads any values from the querystring, the names of the keys should be specified here. + This information is required so that the HttpModule knows when to handle an image request. + + + + + + A virtual file to support IVirtualImageProvider + + + + + The virtual path of the file (relative to the domain, like /app/folder/file.ext) + + + + + Returns an opened stream to the file contents. + + + + + + Implement this to allow your class (or VirtualPathProvider subclass) to be used without registering it with the whole ASP.NET system. + + + + + Returns true if the specified request should be handled by this virtual image provider + + + + + + + + Returns a virtual file instance for the specified path and querystring. + + + + + + + + For virtual files who want to provide their data in Bitmap form (like a PSD reader or gradient generator). Plugins should never assume this interface will be used, .Open() must also be implemented. + + + + + Returns a Bitmap instance of the file's contents + + + + + + Always implement this if possible. Allows caching systems to detect changes to source files and invalidate cached data properly. + + + + + The modified (last write time) of the source file, in UTC form. + + + + + Creates an ImageJob that won't run a full build - it will only do enough work in order to supply the requested data fields. + + + Pass null to use "source.width","source.height", "result.ext","result.mime". + + + + Shorthand method for ImageBuilder.Current.Build(this) + + + + + + A list of strings which define properties that can be returned to the caller. "source.width", "source.height", "result.ext", "result.mime" are the most commonly used. Defaults to none + + + + + A dictionary of key/value pairs provided along with the result. + + + + + The source image's physical path, app-relative virtual path, or a Stream, byte array, Bitmap, VirtualFile, IVirtualFile, HttpPostedFile, or HttpPostedFileBase instance. + + + + + The destination Stream, physical path, or app-relative virtual path. If a Bitmap instance is desired, + set this to typeof(System.Drawing.Bitmap). The result will be stored in .Result + + + + + The result if a Bitmap, BitmapSource, or IWICBitmapSource instance is requested. + + + + + The width, in pixels, of the first frame or page in the source image file + + + + + The height, in pixels, of the first frame or page in the source image file + + + + + The width, in pixels, of the first frame or page in the final image file + + + + + The height, in pixels, of the first frame or page in the final image file + + + + + The correct file extension for the resulting file stream, without a leading dot. Will be null if the result is not an encoded image. + + + + + The correct mime type for the resulting file stream, without a leading dot. Will be null if the result is not an encoded image. + + + + + The image processing settings + + + + + The profiler to report start/stop events to. + + + + + The image processing instructions + + + + + If true, and if 'source' is a IDisposable instead like Bitmap or Stream instance, it will be disposed after it has been used. Defaults to true. + + + + + If true, and if 'source' is seekable, the stream will be reset to its previous position after being read. + Always true for HttpPostedFile(Base) instances, defaults to false for all others. + + + + + If true, and if 'dest' is a Stream instance, it will be disposed after the image has been written. Defaults to false. + + + + + Contains the final physical path to the image (if 'dest' was a path - null otherwise) + + + + + If 'source' contains any path-related data, it is copied into this member for use by format detetction code, so decoding can be optimized. + May be a physical or virtual path, or just a file name. + + + + + If true, the appropriate extension for the encoding format will be added to the destination path, and the result will be stored in FinalPath in physical path form. + + + + + If true (the default), destination paths can include variables that are expanded during the image build process. + Ex. Dest = "~/folder/<guid>.<ext>" will expand to "C:\WWW\App\folder\1ddadaadaddaa75da75ad34ad33da3a.jpg". + + + + + Defaults to false. When true, the parent directory of the destination filename will be created if it doesn't already exist. + + + + + Sets CreateParentDirectory to true. Provided for easy chaining so you can do one-liners. + new ImageJob(source,dest,settings).CreateDir().Build() + + + + + + Internal use only. + Resolves the specified (potenetially templated) path into a physical path. + Applies the AddFileExtension setting using the 'ext' variable. + Supplies the guid, settings.*, filename, path, and originalExt variables. + The resolver method should supply 'ext', 'width', and 'height' (all of which refer to the final image). + If AllowDestinationPathVariables=False, only AddFileExtenson will be processed. + + + + + + + + A name/value collection of image processsing instructions. The successor to ResizeSettings. + Just because a key doesn't have a property wrapper doesn't mean you can't use it. i["key"] = value; isnt' that scary. + + + + + Returns a human-friendly representation of the instruction set. Not suitable for URL usage; use ToQueryString() for that. + + + + + + Returns a URL-safe querystring containing the instruction set + + + + + + Creates an empty instructions collection. + + + + + Copies the specified collection into a new Instructions instance. + + + + + + Parses the specified querystring into name/value pairs. Supports standard and semicolon syntaxes. The most readable format is 'key=value;key2=value2' Discards everything after the first '#' character as a URL fragment. + + + + + + The width in pixels to constrain the image to. See 'Mode' and 'Scale' for constraint logic. + + + + + The height in pixels to constrain the image to. See 'Mode' and 'Scale' for constraint logic. + + + + + The fit mode to use when both Width and Height are specified. Defaults to Pad. + + + + + The alignment to use when cropping or padding the image automatically. Defaults to MiddleCenter. + + + + + Flip instruction to perform immediately after loading source image. Maps to 'sflip' and 'sourceFlip'. + + + + + Flip instruction to perform after rendering is complete + + + + + Control how upscaling is performed. Defaults to DownscaleOnly. + + + + + Allows disk caching to be forced or prevented. + + + + + Allows processing to be forced or prevented. + + + + + The frame of the animated GIF to display. 1-based + + + + + The page of the TIFF file to display. 1-based + + + + + Determines Jpeg encoding quality. Maps to 'quality' setting. + + + + + Maps to 'subsampling'. Requires encoder=wic|freeimage or builder=wic|freeimage to take effect. Not supported by the GDI pipeline. + + + + + Maps to 'colors'. Sets the palette size for the final png or gif image (not relevant for jpegs). + Set to 'null' to use the largest palette size available in the format. + Requires the PrettyGifs or WicEncoder plugin. + + + + + A multiplier to apply to all sizing settings (still obeys Scale=down, though). Useful when you need to apply a page-wide scaling factor, such as for mobile devices. + + + + + Defines the horizontal width of the crop rectangle's coordinate space. For example, setting this to 100 makes the crop X1 and X2 values percentages of the image width. + + + + + Defines the vertical height of the crop rectangle's coordinate space. For example, setting this to 100 makes the crop Y1 and Y1 values percentages of the image height. + + + + + An X1,Y1,X2,Y2 array of coordinates. Unless CropXUnits and CropYUnits are specified, these are in the coordinate space of the original image. + + + + + Automatically rotates images based on gravity sensor data embedded in Exif. Requires the AutoRotate plugin + + + + + Maps to 'srotate'. Rotates the source image prior to processing. Only 90 degree angles are currently supported. + + + + + Maps to 'rotate'. Rotates the image during rendering. Arbitrary angles are supported. + + + + + Use 'OutputFormat' unless you need a custom value. Determines the format and encoding of the output image. + + + + + Selects the image encoding format. Maps to 'format'. Returns null if the format is unspecified or if it isn't defined in the enumeration. + + + + + If true, the ICC profile will be discared instead of being evaluated server side (which typically causes inconsistent and unexpected effects). + + + + + The fallback image to redirect to if the original image doesn't exist. Must be the name of a pre-defined 404 image or a filename in the default 404 images directory. + Requires the Image404 plugin to be installed. + + + + + The color of margin and padding regions. Defaults to Transparent, or White (when jpeg is the selected output color). + + + + + Defaults to 'bgcolor'. Allows a separate color to be used for padding areas vs. margins. + + + + + The color to draw the border with, if a border width is specified. + + + + + The name of a pre-defined preset, or a comma-delimited list of presets to apply. These may overwrite other settings. Requires the Presets plugin. + + + + + The name of a pre-defined watermark layer or group from Web.config, or a comma-delimited list of names. Requires the Watermark plugin. + + + + + Applies a Negative filter to the image. Requires the SimpleFilters plugin + + + + + Applies a Sepia filter to the image. Requires the SimpleFilters plugin + + + + + Applies the specified kind of grayscale filter to the image. Requires the SimpleFilters plugin + + + + + Value between 0 and 1. Makes the rendered image transparent. Does not affect borders or background colors - those accept 4-byte colors with alpha channels, however. + Requires the SimpleFilters plugin. Unless the output format is PNG, the image will be blended against white or the background color. + + + + + -1..1 Adjust the brightness of the image. Requires the SimpleFilters plugin + + + + + -1..1 Adjust the contrast of the image. Requires the SimpleFilters plugin + + + + + -1..1 Adjust the saturation of the image. Requires the SimpleFilters plugin + + + + + Setting this enables automatic whitespace trimming using an energy function. 50 is safe, even 255 rarely cuts anything off except a shadow. Set TrimPadding to pad the result slightly and improve appearance. + Requires the WhitespaceTrimmer plugin. + + + + + Set TrimThreshold first. This specifies a percentage of the image size to 'add' to the crop rectangle. Setting to 0.5 or 1 usually produces good results. + Requires the WhitespaceTrimmer plugin. + + + + + Guassian Blur. Requires the AdvancedFilters plugin. + + + + + Unsharp Mask. Requires the AdvancedFilters plugin. + + + + + Safe noise removal. Requires the AdvancedFilters plugin. + + + + + Controls dithering when rendering to an 8-bit PNG or GIF image. Requires PrettyGifs or WicEncoder. Accepted values for PrettyGifs: true|false|4pass|30|50|79|[percentage]. Accepted values for WicEncoder: true|false. + + + + + Specify a preferred encoder for compressing the output image file. Defaults to 'gdi'. Other valid values are 'freeimage' and 'wic', which require the FreeImageEncoder and WicEncoder plugins respectively. + FreeImage offers faster jpeg encoding, while WIC offers faster PNG and GIF encoding. Both, however, require full trust. + + + + + Specify a preferred decoder for parsing the original image file. Defaults to 'gdi'. Other values include 'freeimage', 'wic', and 'psdreader'. The preferred decoder gets the first chance at reading the files. If that fails, all other decoders try, in order of declaration in Web.config. + Requires the matching FreeImageDecoder, WicDecoder, or PsdReader plugin to be installed. + + + + + Specify the image processing pipeline to use. Defaults to 'gdi'. If FreeImageBuilder or WicBuilder is installed, you can specify 'freeimage' or 'wic' to use that pipeline instead. + The WIC pipeline offers a 2-8X performance increase of GDI, at the expense of slightly reduced image quality, the full trust requirement, and support for only basic resize and crop commands. + FreeImage offers *nix-level image support, and handles many images that gdi and wic can't deal with. It is also restricted to a subset of the full command series. + + + + + Gets or sets a 1 or 4-element array defining cornder radii. If the array is 1 element, it applies to all corners. If it is 4 elements, each corner gets an individual radius. Values are percentages of the image width or height, whichever is smaller. + Requires the SimpleFilters plugin. + + + + + ["paddingWidth"]: Gets/sets the width(s) of padding inside the image border. + + + + + ["margin"]: Gets/sets the width(s) of the margin outside the image border and effects. + + + + + Friendly get/set accessor for the ["borderWidth"] value. Returns null when unspecified. + + + + + IResponseArgs implementation + + + + + Obsolete. Do not use; RequestKey will include the modified date if present. + + + + + A callback method that will resize and encode the image into a stream. + + + + + A value derived from the request. Can be used as a cache key. + + + + + Obsolete. Do not use; RequestKey will include the modified date if present. + + + + + The content-type of the data, among other things. Set ResponseHeaders.ApplyDuringPreSendRequestHeaders to automatically + write caching headers based on ResponseHeaders values. + Caching systems that use redirects may use this data as hints when configuring caching on the remote server. + + + + + The rewritten querystring. Can be useful for caching systems that accept querystring arguments. + + + + + Provides cache selection logic + + + + + Selects a caching system for the specified request and response + + + + + + + + Allows customization of response headers for a processed image, as well as configuration of the caching system. + + + + + The mime-type of the output data. Defaults to null. + + + + + The cache setting. Defaults to ServerAndPrivate + + + + + The UTC time at which the cached data should expire. + Browsers generally don't re-request resources until the they have expired (unlike modififeddate). + If MinValue, will be ignored. + + + + + The UTC modified date send with the response. Used by browsers with If-Modified-Since to check a cached value is still valid. + If = MinValue, will be ignored. + + + + + When true: If a client requests a refresh, the response will *still* be served from the server cache. + Defaults to false + + + + + ASP.Net sometimes sends Vary: * which obliterates caching. Vary is to be avoided anyhow. + Defaults to true + + + + + These headers should be applied first, prior to the application of other settings + + + + + These headers are applied after applying all of the other settings. (and they will overwrite exisiting values). + + + + + Returns a collection of dependencies used for invalidating the server cache. + Note, having items here will disable kernel-mode caching. Perhaps it is better to simply use LastModified + + + + + + A delegate method to apply the values stored in IResponseHeaders to the specified HttpContext. + + + + + True if the application should automatically execute ApplyToResponse() during the PreSendRequestHeaders event. + + + + + The mime-type of the encoded image. Defaults to null + + + + + Provides caching behavior + + + + + Returns false if the cache is unable to process the request. If false, the caller should fall back to a different cache + + + + + + + Must update the cache if needed, then either rewrite, redirect or serve the cached data. + + + + + + + A callback method that will resize, encode, and write the data to the given stream. + Callback may throw FileNotFoundException when running on top of an optimistic VPP + + + + + A callback method to return the last modified date of the source file if available, or DateTime.MinValue if not available. + + + + + + A collection of data and callbacks that can be passed to a caching object. + + + + + A string derived from the request, which can contain any kind of data. To get a cache key that varies with the source modified date, + it should be combined with the value of GetModifiedDateUTC() and hashed. + + + + + The rewritten querystring. Can be useful for caching systems that accept querystring arguments. + + + + + A file extension appropriate for the resulting data. May be different than the extension on the original request. + + + + + The content-type of the data, among other things. Set ResponseHeaders.ApplyDuringPreSendRequestHeaders to automatically + write caching headers based on ResponseHeaders values. + Caching systems that use redirects may use this data as hints when configuring caching on the remote server. + + + + + Obsolete. Do not use; RequestKey will include the modified date if present. + + + + + Obsolete. Do not use; RequestKey includes all invalidation information + + + + + A callback method that will resize, encode, and write the data to the given stream. + + + + + Handles reading the <resizer> section from Web.Config + + + + + Create a ResizerSection instance that wraps the specified node. The node should be a <resizer> element. + + + + + + Parse the specified XML into a Node. The text should include 1 root element, <resizer> + + + + + + Returns the specified subtree, deep copied so it can be used without locking. + + + + + + + Called for each child element not specified declaratively + + + + + + + + A provider (or selector) of IEncoder instances. + + + + + Returns an encoder based on the provided settings and the source object + + Request settings, like format, quality, colors, dither, etc. + May be a Drawing.Image instance, a path, or null. To provide both, set Image.tag to the path. Helps the encoder detect the original format if the format was not specified. + + + + + An image encoder. Exposes methods for suitability checking, encoding, transparency compatibility checking, and mime-type/extension calculation. + + + + + If the encoder can handle the requirements specified by 'settings' and 'source', it should return an encoder instance. + If not, it should return null. + + Request settings, like format, quality, colors, dither, etc. + May be a Drawing.Image instance, a path, or null. To provide both, set Image.tag to the path. Helps the encoder detect the original format if the format was not specified. + May also be used for palette generation hinting by some encoders. + + + + + Encodes the image to the specified stream + + + + + + + True if the output format will support transparency as it is currently configured. + + + + + Returns the appropriate mime-time for the output format as currently configured. + + + + + Returns a file extension appropriate for the output format as currently configured, without a leading dot. + + + + + What to do about remaining handlers/methods for the specified section + + + + + Does nothing + + + + + Requests that ImageBuilder cancels the default logic of the method, and stop executing plugin calls for the method immediately. + + + + + Not for external use. Inherit from BuilderExtension instead. + Dual-purpose base class for both ImageBuilder and BuilderExtension + Extensions can inherit and override certain methods. + ImageBuilder inherits this method to utilize its extension invocation code. + Each method of AbstractImageProcessor loops through all extensions and executes the same method on each. Provides a sort of multiple-inheritance mechanisim. + + + + + Creates a new AbstractImageProcessor with no extensions + + + + + Creates a new AbstractImageProcessor which will run the specified extensions with each method call. + + + + + + Contains the set of extensions that are called for every method. + + + + + Extend this to allow additional types of source objects to be accepted by transforming them into Bitmap instances. + + + + + + + + + Extend this to allow additional types of source objects to be accepted by transforming them into Stream instances. First plugin to return a Stream wins. + + + + + + + + + + + Extensions are executed until one extension returns a non-null value. + This is taken to mean that the error has been resolved. + Extensions should not throw an exception unless they wish to cause subsequent extensions to not execute. + If extensions throw an ArgumentException or ExternalException, it will be wrapped in an ImageCorruptedException instance. + If the Bitmap class is used for decoding, read gdi-bugs.txt and make sure you set b.Tag to new BitmapTag(optionalPath,stream); + + + + + Extend this to support alternate image source formats. + If the Bitmap class is used for decoding, read gdi-bugs.txt and make sure you set b.Tag to new BitmapTag(optionalPath,stream); + + + + + + + + + Extend this to modify the Bitmap instance after it has been decoded by DecodeStream or DecodeStreamFailed + + + + + Extend this to allow additional types of *destination* objects to be accepted by transforming them into a stream. + + + + + + + The method to override if you want to replace the entire pipeline. + All Build() calls call this method first. + Does nothing in ImageBuilder + + + + + + + Called for Build() calls that want the result encoded. (Not for Bitmap Build(source,settings) calls. + Only override this method if you need to replace the behavior of image encoding and image processing together, such as adding support + for resizing multi-page TIFF files or animated GIFs. + + Does NOT dispose of 'source' or 'source's underlying stream. + + + + + + + + + Process.0 First step of the Process() method. Can replace the entire Process method if RequestAction.Cancel is returned. + Can be used to add points to translate (for image maps), and also to modify the settings + + + + + + Process.1 Switches the bitmap to the correct frame or page, and applies source flipping commands. + + + + + + Process.2 Extend this to apply any pre-processing to the source bitmap that needs to occur before Layout begins + + + + + + Process.3(Layout).0: This is the last point at which points to translate should be added. + Only return RequestedAction.Cancel if you wish to replace the entire Layout sequence logic. + + + + + + Process.3(Layout).1: This is where the points in the layout are flipped the same way the source bitmap was flipped (unless their flags specify otherwise) + + + + + + Process.3(Layout).2: Rings 'image' and 'imageArea' are added to the layout. + + + + + + Process.3(Layout).3: Add rings here to insert them between the image area and the padding + + + + + + Process.3(Layout).4: Ring "padding" is added to the layout + + + + + + Process.3(Layout).5: Add rings here to insert them between the padding and the border + + + + + + Process.3(Layout).6: Ring "border" is added to the layout + + + + + + Process.3(Layout).7: Add rings here to insert them between the border and the effect rings + + + + + + Process.3(Layout).8: Effects such as 'shadow' are added here. + + + + + + Process.3(Layout).9: Add rings here to insert them between the effects and the margin + + + + + + Process.3(Layout).10: Margins are added to the layout + + + + + + Process.3(Layout).11: Add rings here to insert them around the margin. Rings will be outermost + + + + + + Process.3(Layout).anytime: Occurs when the layout is rotated. May be called anytime during Layout() + + + + + + Process.3(Layout).anytime: Occurs after the layout is rotated. May be called anytime during Layout() + + + + + + Process.3(Layout).anytime: Occurs when the layout is normalized to 0,0. May be called anytime during Layout() + + + + + + Process.3(Layout).anytime: Occurs after the layout is normalized. May be called anytime during Layout() + + + + + + Process.3(Layout).anytime: Occurs when the layout point values are rounded to integers. May be called anytime during Layout() + + + + + + Process.3(Layout).anytime: Occurs after the layout point values are rounded to integers. May be called anytime during Layout() + + + + + + Process.3(Layout).12: Occurs once layout has finished. No more changes should occur to points or rings in the layout after this method. destSize is calculated here. + + + + + + Process.4: The destination bitmap is created and sized based destSize. A graphics object is initialized for rendering. + + + + + + Process.5(Render) Rendering. Do not return RequestedAction.Cancel unless you want to replace the entire rendering system. + + + + + + Process.5(Render).1 The background color is rendered + + + + + + Process.5(Render).2 After the background color is rendered + + + + + + Process.5(Render).3 Effects (such as a drop shadow or outer glow) are rendered + + + + + + Process.5(Render).4 After outer effects are rendered + + + + + + Process.5(Render).5 Image padding is drawn + + + + + + Process.5(Render).6 After image padding is drawn + + + + + + Process.5(Render).7: An ImageAttributes instance is created if it doesn't already exist. + + + + + + Process.5(Render).8: The ImageAttributes instance exists and can be modified or replaced. + + + + + + Process.5(Render).9: Plugins have a chance to pre-process the source image before it gets rendered, and save it to s.preRenderBitmap + + + + + + Process.5(Render).10: The image is copied to the destination parallelogram specified by ring 'image'. + + + + + + Process.5(Render).11: After the image is drawn + + + + + + Process.5(Render).12: The border is rendered + + + + + + Process.5(Render).13: After the border is drawn + + + + + + Process.5(Render).14: Any last-minute changes before watermarking or overlays are applied + + + + + + Process.5(Render).15: Watermarks can be rendered here. All image processing should be done + + + + + + Process.5(Render).16: Called before changes are flushed and the graphics object is destroyed. + + + + + + Process.5(Render).17: Changes are flushed to the bitmap here and the graphics object is destroyed. + + + + + + Process.5(Render).18: Changes have been flushed to the bitmap, but the final bitmap has not been flipped yet. + + + + + + Process.6: Non-rendering changes to the bitmap object occur here, such as flipping. The graphics object is unavailable. + + + + + + Process.7: Layout and rendering are both complete. + + + + + + Represents the widths of edges of a box. + + + + + Create a box with all edges the same width. + + + + + + Create a box, specifying individual widths for each size + + + + + + + + + Copies the specified BoxPadding instance + + + + + + Sets the width of all edges, returning a new instance + + + + + + + Returns double.NaN unless all edges are the same width, in which case that width is returned + + + + + Returns an instance with a width of 0 + + + + + Returns true if th + + + + + Gets edge offsets as a clockwise array, starting with Top. + + + + + + Provides a subset of layout logic; specifically determining the crop window, target image size, and (initial) target canvas size. + + + + + Encapsulates the state of an image being resized. + Can be used to simulate a resize as well as actually perform one. + All code should ignore when Bitmaps and Graphics objects are null, and go about simulating all the mathematical functions as normal. + + + + + + The commands to apply to the bitmap + + + + + The original size of the source bitmap. Use this instead of accessing the bitmap directly for this information, since the bitmap may not always be available + + + + + Rendering choices can depend on whether the output format supports transparency. + + + + + The layout object. Used for calculated and flowing the layout of the various rings around the image (padding, border, effect, margin, etc). + + + + + The size of the target bitmap image. Set after all sizing operations have completed. + + + + + The dimensions of the bitmap afer all operations have been applied to it (Calling FlipRotate can change the bitmap dimensions). + + + + + The rectangular portion of the source image to copy + + + + + (read-only) Same as copyRect.Size, convenience property. + + + + + The source bitmap. If null, skip drawing commands, but continue layout logic. + + + + + An optional intermediate bitmap, created by plugins who need to process the source bitmap it gets rendered to destBitmap. If defined, it should be used instead of sourceBitmap during RenderImage(), and disposed immediately after use. + + + + + If 'sourceBitmap' is CMYK and `preRenderBitmap` is null, converts `sourceBitmap` to RGB and stores in 'preRenderBitmap' + + + + + Clones 'sourceBitmap' into 'preRenderBitmap' if null. + + + + + Applies copyRect (if it will have any effect), placing the result in preRenderBitmap, and resetting copyRect + + + + + Ensures that the working bitmap is in 32bpp RGBA format - otherwise it is converted. + + + + + The destination bitmap. If null, skip drawing commands, but continue layout logic. + + + + + A graphics object to write to the destination bitmap. If null, skip drawing commands, but continue layout logic. + + + + + Allows color correction/modification during the image copy. + + + + + Allows extensions to store data along with the image state + + + + + Disposes sourceBitmap, destGraphics, destBitmap, and copyAttributes if they are non-null + + + + + Provides a useable base class that can be used to modify the behavior of ImageBuilder. + When registered with an ImageBuilder instance, the ImageBuilder will call the corresponding methods on the extension prior to executing its own methods. + + + + + This polygon participates in the layout phase, and reserves space when added. Affected by all batch operations. Will be returned by LastRing until a new ring is added. + + + + + Doesn't participate in layout, takes no space, but is affected by batch operations. Will never be returned by LastRing and ignored when calculating bounding boxes. + + + + + Completely ignored by all operations, left intact. + + + + + How the pointsToTranslate should be translated if they are cropped out of the destination image. + + + + + An ordered, named collection of polygons. + pointsToTranslate, imageOuterEdge, imageAreaOuterEdge. + + + + + + + Access and set the Point[] arrays of rings by key. Case-insensitive. + + + + + + + Returns the last ring that was added. Only returns PointSets where flags = Ring + + + + + Inflates the last ring using the specified padding options. Returns the resulting ring object + + + + + + + + Add points this way to see where they will occur on the destination image + + + + + + + + Gets a bounding box that encloses all rings that don't have ExcludeFromBoundingBox set. + + + + + + Returns a rectangle representing the given ring - if it is an axis-parallel rectangle. Otherwise returns null; + + + + + + + Rotates all existing rings (Except those flagged ignore) + + + + + + + + Normalizes all rings and invisible polygons so that the outermost ring's bounding box starts at the specified orign. + + + + + + + Scales all rings and invisible polygons by the specified factor, around the specified point. + + + + + + + Translates and scales all rings and invisible polygons as specified. + + + + + + + + + + + + Output image formats + + + + + Jpeg - the best format for photographs and thumbnails + + + + + The best format for transparent images and vector graphics + + + + + A really poor choice for pretty much everything except animation + + + + + When to disk cache the image + + + + + Request no disk caching of the resulting image. + + + + + Request that the resulting image always be disk cached on the server, even if no modifications are made. + + + + + Default caching behavior. Modified images are disk cached, unmodified images are not. + + + + + When to process and re-encode the file. + + + + + Request no processing of the image or file (generally used with cache=always). + The file contents will be used as-is. + + + + + Require the file or image to be processed. Will cause non-image files to fail with an ImageCorruptedException. + + + + + Default. Only files with both a supported image extension and resizing settings specified in the querystring will be processed. + + + + + Controls whether the image is allowed to upscale, downscale, both, or if only the canvas gets to be upscaled. + + + + + The default. Only downsamples images - never enlarges. If an image is smaller than 'width' and 'height', the image coordinates are used instead. + + + + + Only upscales (zooms) images - never downsamples except to meet web.config restrictions. If an image is larger than 'width' and 'height', the image coordinates are used instead. + + + + + Upscales and downscales images according to 'width' and 'height', within web.config restrictions. + + + + + When the image is smaller than the requested size, padding is added instead of stretching the image + + + + + [Deprecated (Use FitMode.Stretch)] Previously used to force an image to be 'stretched' to match a different aspect ratio. + + + + + [Deprecated (Use FitMode)] Maintains aspect ratio. Default. + + + + + [Deprecated (Use FitMode)] Skews image to fit the new aspect ratio defined by 'width' and 'height' + + + + + How to resolve aspect ratio differences between the requested size and the original image's size. + + + + + Fit mode will be determined by other settings, such as &carve=true, &stretch=fill, and &crop=auto. If none are specified and width/height are specified , &mode=pad will be used. If maxwidth/maxheight are used, &mode=max will be used. + + + + + Width and height are considered maximum values. The resulting image may be smaller to maintain its aspect ratio. The image may also be smaller if the source image is smaller + + + + + Width and height are considered exact values - padding is used if there is an aspect ratio difference. Use &anchor to override the MiddleCenter default. + + + + + Width and height are considered exact values - cropping is used if there is an aspect ratio difference. Use &anchor to override the MiddleCenter default. + + + + + Width and height are considered exact values - seam carving is used if there is an aspect ratio difference. Requires the SeamCarving plugin to be installed, otherwise behaves like 'pad'. + + + + + Width and height are considered exact values - if there is an aspect ratio difference, the image is stretched. + + + + + Default. No cropping - uses letterboxing if strecth=proportionally and both width and height are specified. + + + + + [Deprecated] Use Mode=Crop. Minimally crops to preserve aspect ratio if stretch=proportionally. + + + + + Crops using the custom crop rectangle. Letterboxes if stretch=proportionally and both widht and height are specified. + + + + + Indicates the crop units are pixels on the original image. + + + + + Indicates a custom range is being specified for the values. Base 0. + + + + + Horizontal and vertical flipping. Convertible to System.Drawing.RotateFlipType by casting. + + + + + No flipping + + + + + Flip horizontally + + + + + Flip vertically (identical to 180 degree rotation) + + + + + Flip horizontally and vertically + + + + + Anchor location. Convertible to System.Drawing.ContentAlignment by casting. + + + + + Content is vertically aligned at the top, and horizontally aligned on the left. + + + + + Content is vertically aligned at the top, and horizontally aligned at the center. + + + + + Content is vertically aligned at the top, and horizontally aligned on the right. + + + + + Content is vertically aligned in the middle, and horizontally aligned onthe left. + + + + + Content is vertically aligned in the middle, and horizontally aligned at the center. + + + + + Content is vertically aligned in the middle, and horizontally aligned on the right. + + + + + Content is vertically aligned at the bottom, and horizontally aligned on the left. + + + + + Content is vertically aligned at the bottom, and horizontally aligned at the center. + + + + + Content is vertically aligned at the bottom, and horizontally aligned on the right. + + + + + Modes of converting the image to Grayscale. GrayscaleMode.Y usually produces the best resuts + + + + + The reccomended value. Y and NTSC are identical. + + + + + Red, green, and blue are averaged to get the grayscale image. Usually produces poor results compared to other algorithms. + + + + + The Jpeg subsampling mode to use. Requires FreeImageEncoder, FreeImageBuilder, WicEncoder, or WicBuilder. + + + + + The encoder's default subsampling method will be used. + + + + + 411 Subsampling - Only supported by FreeImageBuilder and FreeImageEncoder. Poor quality. + + + + + 420 Subsampling - Commonly used in H262 and H264. Low quality compared to 422 and 444. + + + + + 422 Subsampling - Great balance of quality and file size, commonly used in high-end video formats. + + + + + 444 subsampling - Highest quality, largest file size. + + + + + 444 subsampling - Highest quality, largest file size. + + + + + Provides methods for generating resized images, and for reading and writing them to disk. + Use ImageBuilder.Current to get the current instance (as configured in the application configuration), or use ImageBuilder.Current.Create() to control which extensions are used. + + + + + Shouldn't be used except to make a factory instance. + + + + + Handles the encoder selection and provision proccess. + + + + + May be null. A class to modify or normalize ResizeSettings instances before they are used. + + + + + Provides a resolution service for app-relative URLs. + + + + + Returns a shared instance of ImageBuilder or a subclass, equivalent to Config.Current.CurrentImageBuilder + + + + + + Create a new instance of ImageBuilder using the specified extensions, encoder provider, file provider, and settings filter. Extension methods will be fired in the order they exist in the collection. + + + + + + + + + Creates another instance of the class using the specified extensions. Subclasses should override this and point to their own constructor. + + + + + + + + + + Copies the instance along with extensions. Subclasses must override this. + + + + + + Loads a Bitmap from the specified source. If a filename is available, it will be attached to bitmap.Tag in a BitmapTag instance. The Bitmap.Tag.Path value may be a virtual, relative, UNC, windows, or unix path. + Does not dispose 'source' if it is a Stream or Image instance - that's the responsibility of the calling code. + + May be an instance of string, VirtualFile, IVirtualFile IVirtualBitmapFile, HttpPostedFile, Bitmap, Image, or Stream. If passed an Image instance, the image will be cloned, which will cause metadata, indexed state, and any additional frames to be lost. Accepts physical paths and application relative paths. (C:\... and ~/path) + Will ignore ICC profile if ?ignoreicc=true. + A Bitmap. The .Tag property will include a BitmapTag instance. If .Tag.Source is not null, remember to dispose it when you dispose the Bitmap. + + + + Returns a dictionary of information about the given image. + + + Pass null to get the defaults ("source.width", source.height") + + + + + Loads a Bitmap from the specified source. If a filename is available, it will be attached to bitmap.Tag in a BitmapTag instance. The Bitmap.Tag.Path value may be a virtual, relative, UNC, windows, or unix path. + Does not dispose 'source' if it is a Stream or Image instance - that's the responsibility of the calling code. + + May be an instance of string, VirtualFile, IVirtualFile IVirtualBitmapFile, HttpPostedFile, Bitmap, Image, or Stream. If passed an Image instance, the image will be cloned, which will cause metadata, indexed state, and any additional frames to be lost. Accepts physical paths and application relative paths. (C:\... and ~/path) + Will ignore ICC profile if ?ignoreicc=true. + If true, the position of the source stream will be restored after being read + A Bitmap. The .Tag property will include a BitmapTag instance. If .Tag.Source is not null, remember to dispose it when you dispose the Bitmap. + + + + Decodes the stream into a System.Drawing.Bitmap instance. As of 3.0.7, now ensures the stream can safely be closed after the method returns. + May copy the stream. The copied stream will be in b.Tag.Source. Does not close or dispose any streams. + + + + + + + + + For plugin use only. + Returns a stream instance from the specified source object and settings object. + To exend this method, override GetStream. + + The physical or app-relative path, or a VirtualFile, IVirtualFile, Stream, HttpPostedFile, or HttpPostedFileBase instance. + Querystring settings to pass to the VirtualFileProvider + You should externally initialize this to true, unless the user-provided 'source' is a Stream instance. Will be set to false for HttpPostedFile and HttpPostedFileBase instances, so they can be reused. + The physical or virtual path associated with the stream (if present). Otherwise null + True if you should save and restore the seek position of the stream. True for HttpPostedFile and HttpPostedFileBase instances. + + + + + Resizes and processes the specified source image and returns a bitmap of the result. + Note! + This method assumes that transparency will be supported in the final output format, and therefore does not apply a matte color. Use &bgcolor to specify a background color + if you use this method with a non-transparent format such as Jpeg. + If passed a source Stream, Bitmap, or Image instance, it will be disposed after use. Use disposeSource=False to disable that behavior. + + May be an instance of string (a physical path), VirtualFile, IVirtualBitmapFile, HttpPostedFile, Bitmap, Image, or Stream. + Resizing and processing command to apply to the. + + + + Resizes and processes the specified source image and returns a bitmap of the result. + Note! + This method assumes that transparency will be supported in the final output format, and therefore does not apply a matte color. Use &bgcolor to specify a background color + if you use this method with a non-transparent format such as Jpeg. + + If passed a source Stream, Bitmap, or Image instance, it will not be disposed unless disposeSource=true. + + May be an instance of string (a physical path), VirtualFile, IVirtualBitmapFile, HttpPostedFile, Bitmap, Image, or Stream. + Resizing and processing command to apply to the. + If false, 'source' will not be disposed. + + + + Resizes and processes the specified source image and stores the encoded result in the specified destination. + If passed a source Stream, Bitmap, or Image instance, it will be disposed after use. Use disposeSource=False to disable that behavior. + + May be an instance of string (a physical path or app-relative virtual path), VirtualFile, IVirtualBitmapFile, HttpPostedFile, Bitmap, Image, or Stream. App-relative virtual paths will use the VirtualPathProvider system + May be a physical path (string), or a Stream instance. Does not have to be seekable. + Resizing and processing command to apply to the image. + + + + Resizes and processes the specified source image and stores the encoded result in the specified destination. + If passed a source Stream, Bitmap, or Image instance, it will be disposed after use. Use disposeSource=False to disable that behavior. + + May be an instance of string (a physical path or app-relative virtual path), VirtualFile, IVirtualBitmapFile, HttpPostedFile, Bitmap, Image, or Stream. App-relative virtual paths will use the VirtualPathProvider system + May be a physical path (string), or a Stream instance. Does not have to be seekable. + Resizing and processing command to apply to the image. + + + + Resizes and processes the specified source image and stores the encoded result in the specified destination. + If passed a source Stream, Bitmap, or Image instance, it will not be disposed unless disposeSource=true. + + May be an instance of string (a physical path or app-relative virtual path), VirtualFile, IVirtualBitmapFile, HttpPostedFile, Bitmap, Image, or Stream. App-relative virtual paths will use the VirtualPathProvider system + May be a physical path (string), or a Stream instance. Does not have to be seekable. + Resizing and processing command to apply to the image. + True to dispose 'source' after use. False to leave intact. + + + + Resizes and processes the specified source image and stores the encoded result in the specified destination. + If passed a source Stream, Bitmap, or Image instance, it will not be disposed unless disposeSource=true. + If passed a path destination, the physical path of the written file will be returned. + + May be an instance of string (a physical path or app-relative virtual path), VirtualFile, IVirtualBitmapFile, HttpPostedFile, Bitmap, Image, or Stream. App-relative virtual paths will use the VirtualPathProvider system + May be a physical path (string), or a Stream instance. Does not have to be seekable. + Resizing and processing command to apply to the image. + True to dispose 'source' after use. False to leave intact. + If true, will add the correct file extension to 'dest' if it is a string. + + + + The most flexible method for processing an image + + + + + + + Override this when you need to override the behavior of image encoding and/or Bitmap processing + Not for external use. Does NOT dispose of 'source' or 'source's underlying stream. + + + + + + + + Override this when you need to override the behavior of Bitmap processing. + Not for external use. Does NOT dispose of 'source' or 'source's underlying stream. + + + + True if the output method will support transparency. If false, the image should be provided a matte color + + + + + Processes an ImageState instance. Used by Build, GetFinalSize, and TranslatePoint. + Can be overriden by a plugin with the OnProcess method + + + + + + Process.3: Handles the layout phase of Processing + + + + + + Handles the rendering phase of processing + + + + + + Process.1 Switches the bitmap to the correct frame or page, and applies source flipping commands + + + + + + + Creates a bitmap of s.destSize dimensions, intializes a graphics object for it, and configures all the default settings. + + + + + + Sets the background color if needed or requested + + + + + + Doesn't support flipping. Translate a point on the original bitmap to a point on the new bitmap. If the original point no longer exists, returns Empty + + + + + + Gets the final size of an image + + + + + + Gets the final size of an image + + + + + + Populates copyRect, as well as Rings image and imageArea. Translates and scales any existing rings as if they existed on the original bitmap. + + + + + + Returns a list of the file extensions ImageBuilder can load by default. Plugins can implement IFileExtensionPlugin to add new ones. + + + + + + Returns a list of the querystring commands ImageBuilder can parse by default. Plugins can implement IQuerystringPlugin to add new ones. + + + + + + Monitors incoming image requests to determine if resizing (or other processing) is being requested. + + + + + Called when the app is initialized + + + + + + Current configuration. Same as Config.Current.Pipeline + + + + + This is where we filter requests and intercept those that want resizing performed. + We first strip FakeExtension, then verify the remaining file extension is supported for decoding. + We fire URL rewriting events. If the result includes any supported querystring params afterwards, we process the request. Otherwise we let it fall back to IIS/ASP.NET. + If the file doesn't exist, we also ignore the request. They're going to cause a 404 anyway. + + + + + + + + Generates the resized image to disk (if needed), then rewrites the request to that location. + Perform 404 checking before calling this method. Assumes file exists. + Called during PostAuthorizeRequest + + + + + + + + We don't actually send the data - but we still want to control the headers on the data. + PreSendRequestHeaders allows us to change the content-type and cache headers at exactly the last moment + + + + + + + Represents an non-recoverable exception that occured while processing the image. + Possible causes are: a corrupted source file, cache resource timeout (such as a locked file in imagecache), + unusable configuration (for example, no registered encoders or caches), invalid syntax, or a size limit was exceeded and the request was stopped by the SizeLimiting extension. + May also be caused by a missing source file/resource, in the form of the ImageMissingException subclass. + + + + + This error message is safe to display to the public (should not contain any sensitive information) + + + + + A source file was corrupted + + + + + One or more source files was missing + + + + + Wraps a , optionally overriding the State object (since the Task Asynchronous Pattern doesn't normally use it). + + Class copied from System.Web.Mvc, but with modifications + + + + Initializes a new instance of the class. + + The to wrap. + User-defined object that qualifies or contains information about an asynchronous operation. + + + + Gets a user-defined object that qualifies or contains information about an asynchronous operation. + + A user-defined object that qualifies or contains information about an asynchronous operation. + + + + Gets a that is used to wait for an asynchronous operation to complete. + + A that is used to wait for an asynchronous operation to complete. + + + + Gets a value indicating whether the asynchronous operation completed synchronously. + + true if the asynchronous operation completed synchronously; otherwise, false. + + + + Gets a value indicating whether the asynchronous operation has completed. + + true if the operation is complete; otherwise, false. + + + + Gets the task. + + + + + Provides invariant parsing & serialization of primitive types, like Enums, integers, floats, and booleans. + + + + + Defines a parsing style that permits leading/trailing whitespace, a leading negitve/postiive sign, decimal points, exponential notation, and a thousands separator + + + + + A set of utility methods for manipulating virtual paths + + + + + Returns HostingEnvironment.ApplicationVirtualPath or "/", if asp.net is not running + + + + + If not running in ASP.NET, returns the folder containing the DLL. + + + + + Should be called SetFullExtension. + Sets the file extension of the specified path to the specified value, returning the result. + If an extension has multiple parts, it will replace all of them. + Leading dots will be stripped from 'newExtension' and re-addd as required. + The querystring and fragment is maintained as-is. Semicolon syntax not supported. + + + + + + + + Removes all extension segments from the filename or URL, leaving the querystring intact. I.e, image.jpg.bmp.tiff?hi would be image?hi + The querystring and fragment is maintained as-is. Semicolon syntax not supported. + + + + + + + Removes the extension from the filename or URL, leaving the querystring intact, where the extension is only the last extension segment. + I.e, image.jpg.bmp.tiff?hi would be image.jpg.bmp?hi after this call. + The querystring and fragment is maintained as-is. Semicolon syntax not supported. + + + + + + + Adds the specified extension to path, returning the result. Multiple calls will result in "path.ext.ext.ext.ext". + The querystring and fragment is maintained as-is. Semicolon syntax not supported. + + + + + + + + Will return the full extension, like ".jpg.ashx", not just the last bit. + Excludes extensions containing spaces or slashes. + The querystring and fragment is ignored. Semicolon syntax not supported. + + + + + + + Grabs the last segment of the filename extension. Returns an empty string if there is no extension, or if the extension contains a space. + Includes the leading '.' + The querystring and fragment is ignored. Semicolon syntax not supported. + + + + + + + Resolves app-relative paths to virtual paths. Does nothing with virtual or relative paths. + + + + + + + Turns relative paths into domain-relative paths. + Turns app-relative paths into domain relative paths. + + + + + + + Joins the path and querystring. If the path already contains a querystring, they are 'append joined' with the correct character. Fragment is maintained as-is. + Does not support the semicolon syntax. + + + + + + + + Removes the query string from the specifed path. If the path is only a querystring, an empty string is returned. Does not support the semicolon syntax. Fragment is maintained as-is. + + + + + + + Overwrites exisisting querystring values in 'path' with the values in 'newQuerystring'. Does not support the semicolon syntax. + + + + + + + + Adds the querystring values in 'newQuerystring' to the querystring in Path, but does not overwrite values. Does not support the semicolon syntax. + + + + + + + + Returns a string querystring in the form "?key=value&key=value". + Keys and values are UrlEncoded as they should be. + + + + + + + Returns a string querystring in the form "?key=value&key=value". + Keys and values are UrlEncoded if urlEncode=true. + + + + + + + + Returns a string querystring in the form ";key=value;key=value". + Keys and values are UrlEncoded if urlEncode=true. + + + + + + + + Build a customized querystring from a NameValueCollection + + + True to URL encode all values + If true, null-valued keys will be skipped + Usually ? or ; + Usually & or ; + Always = + + + + + Like ParseQueryString, but permits the leading '?' to be omitted. Does not support the semicolon syntax. + + + + + + + Like ParseQueryString, but permits the leading '?' to be omitted, and semicolons can be substituted for '&' + + + + + + + Parses the querystring from the given path into a NameValueCollection. + accepts "file?key=value" and "?key=value&key2=value2" formats. (no path is required) + UrlDecodes keys and values. + + + + + + + Parses the querystring from the given path into a NameValueCollection. + accepts "file?key=value" and "?key=value&key2=value2" formats. (no path is required) + UrlDecodes keys and values. Does not enforce correct syntax, I.E. '?key=value?key2=value2' is allowed. However, '&key=value?key2=value' will only get key2 parsed. + When allowSemicolons is true, semicolon paths like ';key=value;key2=value2' are allowed, as are hybrid paths: ';key=value?key2=value2&key3=value3'. + + + + + + + + Parses the querystring from the given path into a NameValueCollection. + accepts "file?key=value" and "?key=value&key2=value2" formats. (no path is required) + UrlDecodes keys and values. Does not enforce correct syntax, I.E. '?key=value?key2=value2' is allowed. However, '&key=value?key2=value' will only get key2 parsed. + When allowSemicolons is true, semicolon paths like ';key=value;key2=value2' are allowed, as are hybrid paths: ';key=value?key2=value2&key3=value3'. + + Does NOT parse fragments correctly. + + + + Returns the portion of the 'path' before the querystring. May include the scheme, server, port, path and path info, depending upon what 'path' contained. + + + + + + Parses a querystring into a name/value collection. The given string cannot include path or fragment information - it must be *just* the querystring. + + + + + + + + + Converts aribtrary bytes to a URL-safe version of base64 (no = padding, with - instead of + and _ instead of /) + + + + + + + Converts a URL-safe version of base64 to a byte array. (no = padding, with - instead of + and _ instead of /) + + + + + + + Converts aribtrary strings to a URL-safe version of base64 (no = padding, with - instead of + and _ instead of /) + + + + + + + Converts a URL-safe version of base64 to a string. 64U is (no = padding, with - instead of + and _ instead of /) + + + + + + + Returns the physcial mapped path for the specified virtual path if it starts with ~, otherwise retuns the original path. + + + + + + + Generates a resized image url for the specified physical or virtual path. + Not CloudFront compatible. Does not support remote URLs, use RemoteReader for that. + If you're running in IIS classic, add ".ashx" to the 'path' parameter. + + + + + + + + Attempts to guess the virtual path from physical path. Will be thrwarted if the path is mapped as a virtual folder inside the application. + If the path is a non-physical path, it will be returned as is. + Returns null if the physical path isn't a subfolder of the application's physical path. + + + + + + + Replaces variables in paths with their values. Ex. ~/uploads/thumbs/<guid>.<ext>. + Standard variables are <ext> (the default extension for the final file type), <guid>, a randomly generated GUID, + <filename>, the original filename without it's extension, <path>, the original path and filename without extension, + <settings.width>, (any specified settings value except preset), <width> (final width), and <height> (final height). + + + + + + + + + Allows a string to be filtered using the specified whitelisting expression (regex style). + + I.e, "hi YOU 3", "a-z3" will produce "hi3". + + + + + + + + A method that resolves variable names to values for the ResolveVariablesInPath method + + + + + + + Returns a new collection containing only the specified keys from the old one + + + + + + + + Returns true if the current AppDomain has unrestricted .NET FileIOPermission to the given paths. + Does NOT check NTFS permissions; that's completely separate. + + + + + + + Defines a collection of utility functions for manipulating polygons. These functions may be (re)moved in future releases; be prepared. + + + + + Rounds the elements of the specified array [not used] + + + + + + + Rounds the elements of the specified array [not used] + + + + + + + Modifies the specified array by applying the specified function to each element. + + + object delegate(object o){} + + + + + Rotates the specified polygon (or set of points) around the origin. + + + + + + + + Rotates the specified polygon (or set of points) around the origin. + + + + + + + + + Returns a clockwise array of points on the rectangle. + Point 0 is top-left. + + + + + + + Moves the polygon so that the upper-left corner of its bounding box is located at 0,0. + + + + + + + Rotates the specified point around the origin. + + + + + + + + Rotates the specified point around the specified origin. + + + + + + + + + Returns a modified version of the specified vector with the desired length. + + + + + + + + Returns a bounding box for the specified set of points. + + + + + + + Returns a bounding box for the specified set of points. Odd points are Y values, even points are X values + + + + + + + Returns a modified version of the array, with each element being offset by the specified amount. + + + + + + + + Returns true if the member elements of the specified arrays match, and the arrays + are of the same length. + + + + + + + + Moves element 4 to spot 3 and truncates to 3 elements. + For compatiblity with Graphics.DrawImage + + + + + + + Determines the width and height of the paralellogram. + + + + + + + Grabs a single-dimension array from a 2 dimensional array, using the specified primary index. + + + + + + + + Approximates a radial brush using a high-rez PathGradientBrush. + + + + + + + + + + Scales 'inner' to fit inside 'bounding' while maintaining aspect ratio. Upscales and downscales. + + + + + + + + Scales 'outer' to be equal or larger than 'innerBounds' while maintaining aspect ratio. Upscales and downscales. + + + + + + + + Scales 'inner' to fit inside 'bounding' while maintaining aspect ratio. Only downscales. + + + + + + + + Returns true if 'inner' fits inside or equals 'outer' + + + + + + + + Returns an array of parallelograms. These parallelgrams are the 'corners' outside each vertex in 'poly'. + The adjacent edges are perpendicular to 'poly'. Point 1 of each parallelogram will match the respective point in 'poly' + Points are clockwise. + + TODO - some rounding issues going on, not exact numbers here + + + + + + + + Returns an array of parallelograms. These parallelgrams are the 'corners' outside each vertex in 'poly'. + The adjacent edges are perpendicular to 'poly'. Point 1 of each parallelogram will match the respective point in 'poly' + Points are clockwise. + + Each float in widths[] corresponds to the point in poly[]. This is the distance to go perpendicularly from + the line beween poly[i] and poly[i +1]. + + + + + + + + + Returns an array of parallelograms. These parallelgrams are the 'sides' bounding the polygon. + Points are clockwise. Point 1 is the top-left outer point, point 2 the top-right, point 3 the bottom-right, and point 4 the bottom-left. + + + + + + + + Expands all sides on the specified polygon by the specified offset. Assumes the polygon is concave. + Returns a new polygon + + + + + + + + Expands all sides on the specified polygon by the specified offsets. Assumes the polygon is concave. + Returns a new polygon. + + + + An array the same size as poly[], with the distances to expand the edges. Edges are between i and i+1 + + + + + Moves 'inner' so that the center of its bounding box equals the center of the bounding box of 'outer' + + + + + + + + Creates a rectangle of size 'size' with a center matching that of bounds. + + + + + + Rounds a floating-point rectangle to an integer rectangle using System.Round + + + + + + + Round a floating-point rectangle by apply ceil to x/y and floor to width/height + + + + + + + Aligns the specified rectangle object with its reference ('container') rectangle using the specified alignment. The container can be smaller than 'obj'. + + + + + + + + + Aligns the specified polygon with its container (reference) polygon using the specified alignment. The container can be smaller than 'obj'. + + + + + + + + + Returns a point equidistant beweteen A and B + + + + + + + + Verifies that the specified 4 points are not rotated - that each point shares either the x or y coordinate with the previous point + + + + + + Returns the length of the shortest line segment in the given polygon. + + + + + + Returns the distance between two points + + + + + + + + Normalizes the given angle to a positive multiple of 90 degrees between 0 and 270. + + + + + + + Combines the given flipping info and rotation angle into a RotateFlipType value. Rotation angle will snap to nearest 90-degree multiple + + + + + + + + Used for converting custom crop rectangle coordinates into a valid cropping rectangle. Positive values are relative to 0,0, negative values relative to width, height. + X2 and Y2 values of 0 become width and height respectively. + + An array of 4 elements defining x1, y1, x2, and y2 of the cropping rectangle + The width x1 and x2 are relative to + The height y1 and y2 are relative to + The size of the uncropped image + + + + + Returns 'box' clipped to be within 'bounds' + + + + + + + + Expands the given rectangle to be the given size while keeping it centered. + + + + + + + + Expands the given rectangle using the specified scale multipliers, leaving it centered + + + + + + + + + A Stream utility class that helps to provide seekability to any source + stream. + + + + + Returns a seekable stream for a given source stream. If wrapped, + the source stream will be disposed when the returned stream is. + + The stream to wrap or return. + If the source stream is already seekable, it is returned + unwrapped. If not, it is wrapped in a SeekableStreamWrapper. + + + + Returns a seekable stream for a given source stream. If wrapped, + the source stream will be disposed when the returned stream is. + + The stream to wrap or return. + Whether to dispose the source stream + when the wrapper is disposed. If a wrapper is created, this + parameter will be true on the return to ensure the wrapper + gets properly disposed. + If the source stream is already seekable, it is returned + unwrapped. If not, it is wrapped in a SeekableStreamWrapper. + + + + Disposes the seekable stream wrapper, and the wrapped stream if + originally requested. + + + + + + Gets whether the stream wrapper can be written to or not. + This is only true while the wrapper is being initialized, and + otherwise false for all other callers. + + + + + Parses lists in the form "3,4,5,2,5" and "(3,4,40,50)". If a number cannot be parsed (i.e, number 2 in "5,,2,3") defaultValue is used. + + + + + + + + Copies all remaining data from 'source' to 'dest' + + + + + + + Returns RotateNoneFlipNone if not a recognized value. + + + + + + + Returns 0 if not a recognized value. Rounds the value to 0, 90, 180, or 270 + + + + + + Throws an exception if the specified value is unsupported. Rotation values are not supported, and should be specified with the Rotate or srcRotate command. + + + + + + Parses padding, allowing syntax (all) and (left, top, right, bottom). Parens are optional. + + + + + + + Draws a gradient around the specified polygon. Fades from 'inner' to 'outer' over a distance of 'width' pixels. + + + + + + + + + + Represents the settings which will be used to process the image. + Extends NameValueCollection to provide friendly property names for commonly used settings. + Replaced by the Instructions class. Will be removed in V4.0 + + + + + Creates an empty settings collection. + + + + + Copies the specified collection into a new ResizeSettings instance. + + + + + + Parses the specified querystring into name/value pairs. leading ? not required. + Discards everything after the first '#' character as a URL fragment. + + + + + + Merges the specified collection with a set of defaults into a new + ResizeSettings instance. + + + + + + + Parses the specified querystring into name/value pairs and merges + it with defaultSettings in a new ResizeSettings instance. + + + + + + + Creates a new resize settings object with the specified resizing settings + + + + + The desired image format, like 'jpg', 'gif', or 'png'. Leave null if you want to preserve the original format. + + + + ["width"]: Sets the desired width of the image. (minus padding, borders, margins, effects, and rotation). + The only instance the resulting image will be smaller is if the original source image is smaller. + Set Scale=Both to upscale these images and ensure the output always matches 'width' and 'height'. + If both width and height are specified, the image will be 'letterboxed' to match the desired aspect ratio. + Change the Mode property to adjust this behavior. + + + + + ["height"]: Sets the desired height of the image. (minus padding, borders, margins, effects, and rotation) + The only instance the resulting image will be smaller is if the original source image is smaller. + Set Scale=Both to upscale these images and ensure the output always matches 'width' and 'height'. + If both width and height are specified, the image will be 'letterboxed' to match the desired aspect ratio. + Change the Mode property to adjust this behavior. + + + + + ["maxwidth"]: Sets the maximum desired width of the image. (minus padding, borders, margins, effects, and rotation). + The image may be smaller than this value to maintain aspect ratio when both maxwidth and maxheight are specified. + + + + + ["quality"]: The jpeg encoding quality to use. (10..100). 90 is the default and best value, you should leave it. + + + + + ["maxheight"]: Sets the maximum desired height of the image. (minus padding, borders, margins, effects, and rotation). + The image may be smaller than this value to maintain aspect ratio when both maxwidth and maxheight are specified. + + + + + ["mode"]: Sets the fit mode for the image. max, min, pad, crop, carve, stretch + + + + + Returns true if any of the specified keys are present in this NameValueCollection + + + + + + + ["rotate"] The degress to rotate the image clockwise. -360 to 360. + + + + + How to anchor the image when cropping or adding whitespace to meet sizing requirements. + + + + + Allows you to flip the entire resulting image vertically, horizontally, or both. Rotation is not supported. + + + + + ["sFlip"] Allows you to flip the source image vertically, horizontally, or both. Rotation is not supported. + + + + + ["scale"] Whether to downscale, upscale, upscale the canvas, or both upscale or downscale the image as needed. Defaults to + DownscaleOnly. See the DefaultSettings plugin to adjust the default. + + + + + [Deprecated] (Replaced by mode=stretch) Whether to preserve aspect ratio or stretch to fill the bounds. + + + + + ["cache"]: Server caching mode suggestion for the result + + + + + ["process"]: Server processing suggestion for the result. Allows you to 'disable' processing of the image (so you can use disk caching with non-image files). Allows you to 'force' processing of the image, for images without a querystring. + + + + + ["crop"]=none|auto Defaults to None - letterboxing is used if both width and height are supplied, and stretch = proportionally. + Set CropTopLeft and CropBottomRight when you need to specify a custom crop rectangle. + + + + + 4 values specify x1,y1,x2,y2 values for the crop rectangle. + Negative values are relative to the bottom right - on a 100x100 picture, (10,10,90,90) is equivalent to (10,10,-10,-10). And (0,0,0,0) is equivalent to (0,0,100,100). + + + + + ["crop"]=([x1],[y1],x2,y2). Sets x1 and y21, the top-right corner of the crop rectangle. If 0 or greater, the coordinate is relative to the top-left corner of the image. + If less than 0, the value is relative to the bottom-right corner. This allows for easy trimming: crop=(10,10,-10,-10). + Set ["cropxunits"] and ["cropyunits"] to the width/height of the rectangle your coordinates are relative to, if different from the original image size. + + + + + ["crop"]=(x1,y1,[x2],[y2]). Sets x2 and y2, the bottom-right corner of the crop rectangle. If 1 or greater, the coordinate is relative to the top-left corner of the image. + If 0 or less, the value is relative to the bottom-right corner. This allows for easy trimming: crop=(10,10,-10,-10). + Set ["cropxunits"] and ["cropyunits"] to the width/height of the rectangle your coordinates are relative to, if different from the original image size. + + + + + ["bgcolor"]: Named and hex values are supported. (rgb and rgba, both 3, 6, and 8 digits). + + + + + Gets/sets ["paddingColor"]. Named and hex values are supported. (rgb and rgba, both 3, 6, and 8 digits). + + + + + ["paddingWidth"]: Gets/sets the width(s) of padding inside the image border. + + + + + ["margin"]: Gets/sets the width(s) of the margin outside the image border and effects. + + + + + Gets/sets ["borderColor"]. Named and hex values are supported. (rgb and rgba, both 3, 6, and 8 digits). + + + + + Friendly get/set accessor for the ["borderWidth"] value. Returns BoxPadding.Empty when unspecified. + + + + + Like this["format"]. + Gets or sets the output file format to use. "png", "jpg", and "gif" are valid values. + Returns null if unspecified. When format is not specified, the original format of the image is used (unless it is not a web safe format - jpeg is the fallback in that scenario). + Also checks the 'thumbnail' value for V2 compatibility. When set, 'thumnail' is removed and only 'format' is used. + + + + + + The width which the X and X2 crop values should be applied. For example, a value of '100' makes X and X2 percentages of the original image width. + This can be set to any non-negative value. Very useful for performing cropping when the original image size is unknown. + 0 indicates that the crop values are relative to the original size of the image. + + + + + The width which the Y and Y2 crop values should be applied. For example, a value of '100' makes Y and Y2 percentages of the original image height. + This can be set to any non-negative value. Very useful for performing cropping when the original image size is unknown. + 0 indicates that the crop values are relative to the original size of the image. + + + + + If 'thumbnail' and 'format' are not specified, sets 'format' to the specified value. + + + + + + Returns a string containing all the settings in the class, in querystring form. Use ToStringEncoded() to get a URL-safe querystring. + This method does not encode commas, spaces, etc. + + + + + + Returns a querystring with all the settings in this class. Querystring keys and values are URL encoded properly. + + + + + + This method will 'normalize' command aliases to the primary key name and resolve duplicates. + w->width, h->height, sourceFlip->sFlip, thumbnail->format + + + + + Normalizes a command that has two possible names. + If either of the commands has a null or empty value, those keys are removed. + If both the primary and secondary are present, the secondary is removed. + Otherwise, the secondary is renamed to the primary name. + + + + + + diff --git a/packages/ImageResizer.4.0.5/lib/net45/ImageResizer.dll b/packages/ImageResizer.4.0.5/lib/net45/ImageResizer.dll new file mode 100644 index 0000000..cc48e30 Binary files /dev/null and b/packages/ImageResizer.4.0.5/lib/net45/ImageResizer.dll differ diff --git a/packages/ImageResizer.MvcWebConfig.4.0.5/ImageResizer.MvcWebConfig.4.0.5.nupkg b/packages/ImageResizer.MvcWebConfig.4.0.5/ImageResizer.MvcWebConfig.4.0.5.nupkg new file mode 100644 index 0000000..ff35ea9 Binary files /dev/null and b/packages/ImageResizer.MvcWebConfig.4.0.5/ImageResizer.MvcWebConfig.4.0.5.nupkg differ diff --git a/packages/ImageResizer.Plugins.DiskCache.4.0.5/ImageResizer.Plugins.DiskCache.4.0.5.nupkg b/packages/ImageResizer.Plugins.DiskCache.4.0.5/ImageResizer.Plugins.DiskCache.4.0.5.nupkg new file mode 100644 index 0000000..9e249b8 Binary files /dev/null and b/packages/ImageResizer.Plugins.DiskCache.4.0.5/ImageResizer.Plugins.DiskCache.4.0.5.nupkg differ diff --git a/packages/ImageResizer.Plugins.DiskCache.4.0.5/content/Web.config.transform b/packages/ImageResizer.Plugins.DiskCache.4.0.5/content/Web.config.transform new file mode 100644 index 0000000..185bd2b --- /dev/null +++ b/packages/ImageResizer.Plugins.DiskCache.4.0.5/content/Web.config.transform @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/packages/ImageResizer.Plugins.DiskCache.4.0.5/lib/net45/ImageResizer.Plugins.DiskCache.XML b/packages/ImageResizer.Plugins.DiskCache.4.0.5/lib/net45/ImageResizer.Plugins.DiskCache.XML new file mode 100644 index 0000000..92f48d4 --- /dev/null +++ b/packages/ImageResizer.Plugins.DiskCache.4.0.5/lib/net45/ImageResizer.Plugins.DiskCache.XML @@ -0,0 +1,1135 @@ + + + + ImageResizer.Plugins.DiskCache + + + + + How many bytes of buffered file data to hold in memory before refusing futher queue requests and forcing them to be executed synchronously. + + + + + If the collection contains the specified item, it is returned. Otherwise, null is returned. + + + + + + + Returns how many bytes are allocated by buffers in the queue. May be 2x the amount of data. Represents how much ram is being used by the queue, not the amount of encoded bytes that will actually be written. + + + + + + Removes the specified object based on its relativepath and modifieddateutc values. + + + + + + Returns false when (a) the specified AsyncWrite value already exists, (b) the queue is full, or (c) the thread pool queue is full + + + + + + + + Returns the UTC time this AsyncWrite object was created. + + + + + Returns the length of the Data + + + + + + Returns the length of the buffer capacity + + + + + + Wraps the data in a readonly MemoryStream so it can be accessed on another thread + + + + + + Handles access to a disk-based file cache. Handles locking and versioning. + Supports subfolders for scalability. + + + + + Fired immediately before GetCachedFile return the result value. + + + + + Provides string-based locking for file write access. + + + + + Provides string-based locking for image resizing (not writing, just processing). Prevents duplication of efforts in asynchronous mode, where 'Locks' is not being used. + + + + + Contains all the queued and in-progress writes to the cache. + + + + + Provides an in-memory index of the cache. + + + + + If the cached data exists and is up-to-date, returns the path to it. Otherwise, this function tries to cache the data and return the path. + + The basis for the cache key. + The extension to use for the cached file. + A method that accepts a Stream argument and writes the data to it. + = + + + + + May return either a physical file name or a MemoryStream with the data. + Faster than GetCachedFile, as writes are (usually) asynchronous. If the write queue is full, the write is forced to be synchronous again. + Identical to GetCachedFile() when asynchronous=false + + + + + + + + + + Returns true if either (a) the file was written, or (b) the file already existed with a matching modified date. + Returns false if the in-process lock failed. Throws an exception if any kind of file or processing exception occurs. + + + + + + + + + + + + Provides locking based on a string key. + Locks are local to the LockProvider instance. + The class handles disposing of unused locks. Generally used for + coordinating writes to files (of which there can be millions). + Only keeps key/lock pairs in memory which are in use. + Thread-safe. + + + + + The only objects in this collection should be for open files. + + + + + Synchronization object for modifications to the 'locks' dictionary + + + + + Returns true if the given key *might* be locked. + + + + + + + Attempts to execute the 'success' callback inside a lock based on 'key'. If successful, returns true. + If the lock cannot be acquired within 'timoutMs', returns false + In a worst-case scenario, it could take up to twice as long as 'timeoutMs' to return false. + + + + + + + + Uses old.AccessedUtc if it is newer than FileInfo.LastAccessTimeUtc + + + + + + + The modified date of the source file that the cached file is based on. + + + + + The last time the file was accessed. Will not match NTFS date, this value is updated by DiskCache. + When first loaded from NTFS, it will be granular to about an hour, due to NTFS delayed write. Also, windows Vista and higher never write accessed dates. + We update this value in memory, and flush it to disk lazily. + + + + + The Created date of the cached file - the last time the cached file was written to + + + + + Represents a cached view of a folder of cached items + + + + + Defaults to false. Set to true immediately after being refreshed from the filesystem. + Set to false if a file disappears from the filesystem cache without the cache index being notified first. + Used by the cleanup system - not of importance to the cache write system. + + + + + Fired when a file disappears from the cache folder without the cache index knowing about it. + + + + + Returns null if (a) the file doesn't exist, or (b) the file isn't populated. Calling code should always fall back to filesystem calls on a null result. + + + + + + + Sets the CachedFileInfo object for the specified path, creating any needed folders along the way. + If 'null', the item will be removed, and no missing folder will be created. + + + + + + + Tries to set the AccessedUtc of the specified file to the current date (just in memory, not on the filesystem). + + + + + + + Gets a CachedFileInfo object for the file even if it isn't in the cache (falls back to the filesystem) + + + + + + + + Verifies the file exists before returning the cached data. + Discrepancies in file existence result in OnFileDisappeard being fired. + + + + + + + + Returns the value of IsValid on the specified folder if present, or 'false' if not present. + + + + + + + Not thread safe. + + + + + + + returns a list + + + + + + + returns a dictionary of files. + + + + + + + returns a dictionary of files. + + + + + + + Refreshes file and folder listing for this folder (non-recursive). Sets IsValid=true afterwards. + + + + + + + + Updates the 'folders' dictionary to match the folders that exist on disk. ONLY UPDATES THE LOCAL FOLDER + + + + + + + Updates the 'files' dictionary to match the files that exist on disk. Uses the accessedUtc values from the previous dictionary if they are newer. + + + + + + + Returns true if both dates are equal to the nearest 200th of a second. + + + + + + + + + + + + + + + Provides thread-safe access to the index of the disk cache + + + + + Failed to acquire a lock on the cached item within the timeout period + + + + + The item wasn't cached, but was successfully added to the cache (or queued, in which case you should read .Data instead of .PhysicalPath) + + + + + The item was already in the cache. + + + + + The physical path to the cached item. Verify .Data is null before trying to read from this file. + + + + + Provides a read-only stream to the data. Usually a MemoryStream instance, but you should dispose it once you are done. + If this value is not null, it indicates that the file has not yet been written to disk, and you should read it from this stream instead. + + + + + The path relative to the cache + + + + + The result of the cache check + + + + + When true, indicates that another process is managing cleanup operations - this thread is idle, waiting for the other process to end before it can pick up work. + + + + + Notifies the CleanupManager that a request is in process. Helps CleanupManager optimize background work so it doesn't interfere with request processing. + + + + + Notifies the CleanupManager that a file was added under the specified relative path. Allows CleanupManager to detect when a folder needs cleanup work. + + + + + + Queues the item if no other identical items exist in the queue. Returns true if the item was added. + + + + + + + Inserts the specified list of items and the end of the queue. They will be next items popped. + They will pop off the list in the same order they exist in 'items' (i.e, they are inserted in reverse order). + + + + + + Performs an atomic clear and enqueue of the specified item + + + + + + Creates and starts a thread that consumes the queue, pausing until notified when 'queue' empties. + + + + + + + + + Tells the worker to check the queue for more work. + + + + + The last time a cache folder exceeded both the optimum and maximum limits for file count. + If recent, indicates a misconfiguration; the subfolders="" count needs to be increased. + + + + + The last time a cache query came through + + + + + Tells the worker to avoid work for a little bit. + + + + + The last time we did work (or attempted to do work, failing if the queue was empty) + + + + + When true, indicates that another process is managing cleanup operations - this thread is idle, waiting for the other process to end before it can pick up work. + + + + + When true, indicates that another process is managing cleanup operations - this thread is idle, waiting for the other process to end before it can pick up work. + + + + + Thread runs this method. + + + + + Processes work items from the queue, using at most 50% + + + + + Processes items from the queue for roughly the specified amount of time. + Returns false if the queue was empty. + + + + + + + An item in the work queue + + + + + Should be a delegate a CleanupWorkItem instance (which doesn't have LazyProvider value, but has RelativePath and PhyscialPath values). May return null + + + + + Cache-relative path + + + + + Physcial path + + + + + If the .IsValid is false, populates the folder, enqueing more PopulateFolderRecursive items for all subfolders discovered. Sets IsValid to true + + + + + Requires a valid folder. + + + + + Cleans the folder, enqueing RemoveFile tasks for everything that needs to be removed. + + + + + Populates (non-recursive) the files and folders inside the specified directory. + + + + + Removes a single file, with the file and dir being determined at executing time via the LazyProvider delegate. + + + + + Calls File.SetLastAccessedTimeUtc() using the in-memory value, if present. + + + + + Handles access to a disk-based file cache. Handles locking and versioning. + Supports subfolders for scalability. + + + + + Fired immediately before GetCachedFile return the result value. + + + + + Provides string-based locking for file write access. + + + + + Provides string-based locking for image resizing (not writing, just processing). Prevents duplication of efforts in asynchronous mode, where 'Locks' is not being used. + + + + + Contains all the queued and in-progress writes to the cache. + + + + + Provides an in-memory index of the cache. + + + + + If the cached data exists and is up-to-date, returns the path to it. Otherwise, this function tries to cache the data and return the path. + + The basis for the cache key. + The extension to use for the cached file. + A method that accepts a Stream argument and writes the data to it. + = + + + + + May return either a physical file name or a MemoryStream with the data. + Faster than GetCachedFile, as writes are (usually) asynchronous. If the write queue is full, the write is forced to be synchronous again. + Identical to GetCachedFile() when asynchronous=false + + + + + + + + + + + Returns true if either (a) the file was written, or (b) the file already existed with a matching modified date. + Returns false if the in-process lock failed. Throws an exception if any kind of file or processing exception occurs. + + + + + + + + + + + + Indicates a problem with disk caching. Causes include a missing (or too small) ImageDiskCacheDir setting, and severe I/O locking preventing + the cache dir from being cleaned at all. + + + + + Provides methods for creating, maintaining, and securing the disk cache. + + + + + Controls how many subfolders to use for disk caching. Rounded to the next power of to. (1->2, 3->4, 5->8, 9->16, 17->32, 33->64, 65->128,129->256,etc.) + NTFS does not handle more than 8,000 files per folder well. Larger folders also make cleanup more resource-intensive. + Defaults to 8192, which combined with the default setting of 400 images per folder, allows for scalability to ~1.5 million actively used image versions. + For example, given a desired cache size of 100,000 items, this should be set to 256. + + + + + Allows disk caching to be disabled for debugging purposes. Defaults to true. + + + + + If true, items from the cache folder will be automatically 'garbage collected' if the cache size limits are exceeded. + Defaults to false. + + + + + Only relevant when AutoClean=true. Settings about how background cache cleanup are performed. + It is best not to modify these settings. There are very complicated and non-obvious factors involved in their choice. + + + + + Sets the timeout time to 15 seconds as default. + + + + + How many milliseconds to wait for a cached item to be available. Values below 0 are set to 0. Defaults to 15 seconds. + Actual time spent waiting may be 2 or 3x this value, if multiple layers of synchronization require a wait. + + + + + If true, writes to the disk cache will be performed outside the request thread, allowing responses to return to the client quicker. + + + + + If more than this amount of memory (in bytes) is currently allocated by queued writes, the request will be processed synchronously instead of asynchronously. + + + + + Sets the location of the cache directory. + Can be a virtual path (like /App/imagecache) or an application-relative path (like ~/imagecache, the default). + Relative paths are assummed to be relative to the application root. + All values are converted to virtual path format upon assignment (/App/imagecache) + Will throw an InvalidOperationException if changed after the plugin is installed. + + + + + Returns the physical path of the cache directory specified in VirtualCacheDir. + + + + + Throws an exception if the class is already modified + + + + + Creates a disk cache in the /imagecache folder + + + + + Creates a DiskCache instance at the specified location. Must be installed as a plugin to be operational. + + + + + + Uses the defaults from the resizing.diskcache section in the specified configuration. + Throws an invalid operation exception if the DiskCache is already started. + + + + + Loads the settings from 'c', starts the cache, and registers the plugin. + Will throw an invalidoperationexception if already started. + + + + + + + Removes the plugin from the given configuration container + + + + + + + Returns true if the configured settings are valid and .NET (not NTFS) permissions will work. + + + + + + Returns true if .NET permissions allow writing to the cache directory. Does not check NTFS permissions. + + + + + + Returns true if the DiskCache instance is operational. + + + + + Attempts to start the DiskCache using the current settings. Returns true if succesful or if already started. Returns false on a configuration error. + Called by Install() + + + + + Returns true if stopped succesfully. Cannot be restarted + + + + + + Returns the license key feature codes that are able to activate this plugins. + + + + + Loads settings from the specified node. Attribute names and property names must match. + + + + + + Saves the current settings to the dictionary of default settings. + + + + + Restores the default property valies + + + + + How long to wait before beginning the initial cache indexing and cleanup. + + + + + The minimum amount of time to wait after the most recent BeLazy to begin working again. + + + + + The maximum amount of time to wait between work segements + + + + + The optimal length for a work segment. Not always achieved. + + + + + The ideal number of cached files per folder. (defaults to 400) Only reached if it can be achieved without volating the AvoidRemoval... limits + + + + + The maximum number of cached files per folder. (defaults to 1000) Only reached if it can be achieved without violating the ProhibitRemoval... limits + + + + + Please note "LastUsed" values are (initially) only accurate to about a hour, due to delayed write. + If a file has been used after the app started running, the last used date is accurate. + + + + + Please note "LastUsed" values are (initially) only accurate to about a hour, due to delayed write. + If a file has been used after the app started running, the last used date is accurate. + + + + + Provides locking based on a string key. + Locks are local to the LockProvider instance. + The class handles disposing of unused locks. Generally used for + coordinating writes to files (of which there can be millions). + Only keeps key/lock pairs in memory which are in use. + Thread-safe. + Uses SemaphoreSlim instead of locks to be thread-context agnostic. + + + + + The only objects in this collection should be for open files. + + + + + Synchronization object for modifications to the 'locks' dictionary + + + + + Returns true if the given key *might* be locked. + + + + + + + Attempts to execute the 'success' callback inside a lock based on 'key'. If successful, returns true. + If the lock cannot be acquired within 'timoutMs', returns false + In a worst-case scenario, it could take up to twice as long as 'timeoutMs' to return false. + + + + + + + + Builds a key for the cached version, using the hashcode of the normalized URL. + if subfolders > 1, dirSeparator will be used to separate the subfolder and the key. + No extension is appended. + I.e, a13514\124211ab132592 or 12412ababc12141 + + + + + + + + + Returns a string for the subfolder name. The bits used are from the end of the hash - this should make + the hashes in each directory more unique, and speed up performance (8.3 filename calculations are slow when lots of files share the same first 6 chars. + Returns null if not configured. Rounds subfolders up to the nearest power of two. + + + + + + + + Handles writing a Web.Config to disk that uses Url Authorization to prevent visitors + from accessing the files directly. Alternative Web.config content can be specified, this is a general-purpose implementation. Uses UTF-8 encoding. + Also provides methods for efficient verification that the file still exists. + Thread-safe. + + + + + This string contains the contents of a web.conig file that sets URL authorization to "deny all" inside the current directory. + + + + + Verifies a Web.config file is present in the directory every 5 minutes that the function is called, including the first time. + + + + + + If CheckWebConfig has never executed, it is executed immediately, but only once. + Verifies a Web.config file is present in the directory, and creates it if needed. + + + + + Verifies a Web.config file is present in the directory, and creates it if needed. + + + + + Should only be called inside a lock. Creates the cache dir and the web.config file if they are missing. Updates + _lastCheckedWebConfig and _checkedWebConfigOnce + + + + + Returns the license key feature codes that are able to activate this plugins. + + + + + Defaults to 10MB limit, and samples usage over the last 10 minutes when deciding what to remove. Stuff not used in the last 10 minutes gets discarded even if the limit hasn't been reached. + + + + + Adds the plugin to the given configuration container + + + + + + + Removes the plugin from the given configuration container + + + + + + + Implements IHttpHandler, serves content for the NoCache plugin + + + + + Like DiskCache, but for source files. Not advisable if your source image collection is larger than available local storage. + + + + + Creates a new instance of SourceDiskCache + + + + + Sets the location of the cache directory. + Can be a virtual path (like /App/imagecache) or an application-relative path (like ~/imagecache, the default). + Relative paths are assummed to be relative to the application root. + All values are converted to virtual path format upon assignment (/App/imagecache) + Will throw an InvalidOperationException if changed after the plugin is installed. + + + + + Returns the physical path of the cache directory specified in VirtualCacheDir. + + + + + Throws an exception if the class is already modified + + + + + Returns true if the DiskCache instance is operational. + + + + + Loads the settings from 'c', starts the cache, and registers the plugin. + Will throw an invalidoperationexception if already started. + + + + + + + Removes this plugin from the given configuration container + + + + + + + Returns true if the configured settings are valid and .NET (not NTFS) permissions will work. + + + + + + Returns true if .NET permissions allow writing to the cache directory. Does not check NTFS permissions. + + + + + + Attempts to start the DiskCache using the current settings. Returns true if succesful or if already started. Returns false on a configuration error. + Called by Install() + + + + + Returns true if stopped succesfully. Cannot be restarted + + + + + + Returns the license key feature codes that are able to activate this plugins. + + + + + The estimated ram usage for the entire cache. Relies upon the accuracy of the calculator delegate + + + + + Specifies counter granularity, memory limits, cleanup intervals, and threading optimization level. + + + + + Much faster than accurate mode, but at the expense of extremely rare counter inaccuracies. Irrelevant in light of counter granularity, usually. + + + + + Whether to optimize for performance or counter accuracy. Defaults to Fast + + + + + How granular to track the time. For example, with a granularity of 8 (default), and an 8-minute tracking duration, the counter will track the last 7-8 minutes (maximum 0-59.9 second time window variance). + + + + + Specifies a hard limit on the number of bytes used for tracking purposes. Causes the smallest-valued items to get discarded first. Doesn't count key size unless SetCustomSize is called on the items. Set to 0 to disable (default) + + + + + Specifies how often to eliminate 0-valued items from the dictionary. Defaults to 20 seconds. Only potentially triggered by .Increment() or PingCleanup() calls. + + + + + The estimated size (in bytes) of a counter (excluding the key). Based on CounterGranularity + + + + + Maintains a dictionary of keys to counters. Counters track how many events have occured during the last X minutes/seconds/ticks for the given item. + Can enforce size limits and cleanup empty counters on an inverval. + + + + + + The duration for which to track events. For example, 5 minutes will keep a rolling value of how many events have occured in the last 5 minutes + + + + + The estimated number of bytes used for tracking, plus the sum of the CustomSize values. Key space not included unless the caller always includes key size in CustomSize parameter. + + + + + For incrementing and finding counters based on keys + + + + + Purely for cleanup purposes. Allows fast removal of pairs based on the EventCounter instance. + + + + + Lock for access to dictionaries + + + + + Lock on EventCounter.sortValue members. Redundant with cleanupLock implemented. + + + + + Lock to prevent concurrent cleanups from occuring + + + + + Lock to prevent duplicate work items from being scheduled. + + + + + Starts cleanup on a thread pool thread if it hasn't been started within the desired interval. If cleanup starts and other cleanup is running, it cancels. The assumption is that one cleanup of either type is enough within the interval. + + + + + Performs cleanup on the dictionaries in either MakeRoom or Maintenance mode. Returns true if the goal was achieved, false if the cleanup was canceled because another cleanup was executing conurrently. + + + + + + Increment the counter for the given item. Pings cleanup as well. + + + Sets the custom size offset for the specified key (used for cleanup purposes). If -1, existing value will remain unchanged. + + + + Calculate the counter value for the given item + + + + + + + Maintains a rotating data structure to track events over a moving time period. + + + + + User-defined size of related item (key and/or a related cache object). Defaults to 0; + + + + + Returns the value of the counter + + + + + + Warning! Not synchronized or updated. Use must be externally synchromized and value set externally + + + + + Defaults to 10MB limit, and samples usage over the last 10 minutes when deciding what to remove. Stuff not used in the last 10 minutes gets discarded even if the limit hasn't been reached. + + + + + Retrieves file if cached. + + + + + + + + + Returns the license key feature codes that are able to activate this plugins. + + + + + Source file cached in memory. + + + + diff --git a/packages/ImageResizer.Plugins.DiskCache.4.0.5/lib/net45/ImageResizer.Plugins.DiskCache.dll b/packages/ImageResizer.Plugins.DiskCache.4.0.5/lib/net45/ImageResizer.Plugins.DiskCache.dll new file mode 100644 index 0000000..e164941 Binary files /dev/null and b/packages/ImageResizer.Plugins.DiskCache.4.0.5/lib/net45/ImageResizer.Plugins.DiskCache.dll differ diff --git a/packages/ImageResizer.Plugins.PrettyGifs.4.0.5/ImageResizer.Plugins.PrettyGifs.4.0.5.nupkg b/packages/ImageResizer.Plugins.PrettyGifs.4.0.5/ImageResizer.Plugins.PrettyGifs.4.0.5.nupkg new file mode 100644 index 0000000..723bcbe Binary files /dev/null and b/packages/ImageResizer.Plugins.PrettyGifs.4.0.5/ImageResizer.Plugins.PrettyGifs.4.0.5.nupkg differ diff --git a/packages/ImageResizer.Plugins.PrettyGifs.4.0.5/content/Web.config.transform b/packages/ImageResizer.Plugins.PrettyGifs.4.0.5/content/Web.config.transform new file mode 100644 index 0000000..953b3fd --- /dev/null +++ b/packages/ImageResizer.Plugins.PrettyGifs.4.0.5/content/Web.config.transform @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/packages/ImageResizer.Plugins.PrettyGifs.4.0.5/lib/net45/ImageResizer.Plugins.PrettyGifs.XML b/packages/ImageResizer.Plugins.PrettyGifs.4.0.5/lib/net45/ImageResizer.Plugins.PrettyGifs.XML new file mode 100644 index 0000000..d8e21a1 --- /dev/null +++ b/packages/ImageResizer.Plugins.PrettyGifs.4.0.5/lib/net45/ImageResizer.Plugins.PrettyGifs.XML @@ -0,0 +1,577 @@ + + + + ImageResizer.Plugins.PrettyGifs + + + + + Replaces .NET's poor default GIF encoding algorithm with Octree quantization and dithering, and allows 8-bit PNG creation. Compatible with all plugins. + + + + + Creates a new instance of the plugin + + + + + Creates a new instance of the plugin as an encoder + + + + + + + If true, the original palette will be used if it exists. May cause serious color problems if new content has been added to the image. + + + + + The number of colors to use. Only applicable for png, gif, and bmp photos where palletes can be used. + The default is -1, which means "as much color fidelity as possible". + + + + + Enables dithering for PNG8 and GIF + + + + + + + + + + How much of the error should be passed on (in negative form) to neighbor pixels + + + + + If you set this to anything other than Gif or Png, it will throw an exception. Defaults to GIF. + + + + + Returns an encoder instance if a Gif or 8-bit png is requested. + + + + + + + + + + + + + + + + Writes the indexed PNG or GIF file + + + + + + + + + + + + + + + + + + + Returns true if the assembly can call unmanged code (i.e, has full trust) + + + + + Returns how many bits are required to store the specified number of colors. Performs a Log2() on the value. + + + + + + + Returns true if the this encoder supports the specified image format + + + + + + + If the configured encoding settings support transparency. + + + + + The suggested mime-type for the output image produced by this encoder + + + + + The suggested extension for the output image produced by this encoder + + + + + Returns the querystrings command keys supported by this plugin. + + + + + + Adds the plugin to the given configuration container + + + + + + + Removes the plugin from the given configuration container + + + + + + + Quantize using an Octree + + + + + Construct the octree quantizer + + + The Octree quantizer is a two pass algorithm. The initial pass sets up the octree, + the second pass quantizes a color based on the nodes in the tree + + The maximum number of colors to return + The number of significant bits + + + + Clears the octree + + + + + Clears the octree and reconfigures color settings + + + + + + + Process the pixel in the first pass of the algorithm + + The pixel to quantize + + This function need only be overridden if your quantize algorithm needs two passes, + such as an Octree quantizer. + + + + + Uses a Floyd-Steinberg dither + + + + + a Floyd-Steinberg dither matrix + new float[,] {{0,0,0}, + {0,0,0.44f}, + {0.19f,0.31f,0.06f}}; + + + + + Override this to process the pixel in the second pass of the algorithm + + The pixel to quantize + The quantized value + + + + Retrieve the palette for the quantized image + + Any old palette, this is overrwritten + The new color palette + + + + Stores the tree + + + + + Maximum allowed color depth + + + + + Class which does the actual quantization + + + + + Construct the octree + + The maximum number of significant bits in the image + + + + Add a given color value to the octree + + + + + + Reduce the depth of the tree + + + + + Get/Set the number of leaves in the tree + + + + + Return the array of reducible nodes + + + + + Keep track of the previous node that was quantized + + The node last quantized + + + + Convert the nodes in the octree to a palette with a maximum of colorCount colors + + The maximum number of colors + An arraylist with the palettized colors + + + + Get the palette index for the passed color + + + + + + + Mask used when getting the appropriate pixels for a given node + + + + + The root of the octree + + + + + Number of leaves in the tree + + + + + Array of reducible nodes + + + + + Maximum number of significant bits in the image + + + + + Store the last node quantized + + + + + Cache the previous color quantized + + + + + Class which encapsulates each node in the tree + + + + + Construct the node + + The level in the tree = 0 - 7 + The number of significant color bits in the image + The tree to which this node belongs + + + + Add a color into the tree + + The color + The number of significant color bits + The level in the tree + The tree to which this node belongs + + + + Get/Set the next reducible node + + + + + Return the child nodes + + + + + Reduce this node by removing all of its children + + The number of leaves removed + + + + Traverse the tree, building up the color palette + + The palette + The current palette index + + + + Return the palette index for the passed color + + + + + Added may 19-09. Should help with dithering. + + + + + + + Increment the pixel count and add to the color information + + + + + Flag indicating that this is a leaf node + + + + + Number of pixels in this node + + + + + Red component + + + + + Green Component + + + + + Blue component + + + + + Pointers to any child nodes + + + + + Pointer to next reducible node + + + + + The index of this node in the palette + + + + + Abstract Quantizer class - handles the messy, algorithm-independent details of quantization. + Subclasses must implement InitialQuantizePixel, GetPallete(), and QuantizePixel. Not thread-safe! + + + + + (Readonly) If true, the algorithm can do everything in QuantizePixel, and InitialQuantizePixel will not be called. Implies ResizeForFirstPass=False and FourPass=false= + + + + + The number of bytes in a ARGB structure. Should be 4 + + + + + If true, pointer arithmetic will be used instead of GetPixel. GetPixel is much slower. If false, OmitFinalStage will be assumed true, as only palette generation is possible in low trust. + Defaults to true. + + + + + If true, the first pass (InitialQuantizePixel) will be performed on a size-limited version of the original image to control performance. Ignored if FixedPalette=True + + + + + The approximate number of pixels to use when making a scaled copy of the image for the first pass. Only used when ResizeForFirstPass=True and FirstPassPixelThreshold is exceeded. + + + + + The maximum number of pixels the original image may contain before a scaled copy is made for the first pass. + Only relevant when ResizeForFirstPass=True + + + + + If true, image is re-paletted after quantization - forces 2 clones of the original image to be created. FixedPalette and OmitFinalStage should be false if this is used. + + + + + If true, a 32-bit image with an 8-bit palette will be returned instead of an 8-bit image, which GDI can save using median-cut quantization. Much faster than our final quantization pass, although it can't do transparency. + Assumed true if FullTrust is false. + + + + + Construct the quantizer + + If true, the quantization only needs to loop through the source pixels once - InitialQuantiize + + If you construct this class with a true value for singlePass, then the code will, when quantizing your image, + only call the 'QuantizeImage' function. If two passes are required, the code will call 'InitialQuantizeImage' + and then 'QuantizeImage'. + + + + + Resets the quantizer so it can process a new image. + + + + + Quantize an image and return the resulting output bitmap + + The image to quantize + A quantized version of the image + + + + Execute the first pass through the pixels in the image + + The source data + The width in pixels of the image + The height in pixels of the image + + + + Execute a second pass through the bitmap. If dithering is enabled, sourceData will be modified. + + The source bitmap, locked into memory + The intermediate bitmap, used for 4-pass quantization. If specified, output will not actually be modified + The output bitmap + The width in pixels of the image + The height in pixels of the image + The bounding rectangle + + + + Can only be called from QuantizePixel... + This is how dithering is done... + 5-18-09 ndj + + + + + + + + + + + Override this to process the pixel in the first pass of the algorithm + + The pixel to quantize + + This function need only be overridden if your quantize algorithm needs two passes, + such as an Octree quantizer. + + + + + Override this to process the pixel in the second pass of the algorithm + + The pixel to quantize + The quantized value + + + + Retrieve the palette for the quantized image + + Any old palette, this is overrwritten + The new color palette + + + + Struct that defines a 32 bpp colour + + + This struct is used to read data from a 32 bits per pixel image + in memory, and is ordered in this manner as this is the way that + the data is layed out in memory + + + + + Holds the blue component of the colour + + + + + Holds the green component of the colour + + + + + Holds the red component of the colour + + + + + Holds the alpha component of the colour + + + + + Permits the color32 to be treated as an int32 + + + + + Return the color for this Color32 object + + + + diff --git a/packages/ImageResizer.Plugins.PrettyGifs.4.0.5/lib/net45/ImageResizer.Plugins.PrettyGifs.dll b/packages/ImageResizer.Plugins.PrettyGifs.4.0.5/lib/net45/ImageResizer.Plugins.PrettyGifs.dll new file mode 100644 index 0000000..1df7bf7 Binary files /dev/null and b/packages/ImageResizer.Plugins.PrettyGifs.4.0.5/lib/net45/ImageResizer.Plugins.PrettyGifs.dll differ diff --git a/packages/ImageResizer.WebConfig.4.0.5/ImageResizer.WebConfig.4.0.5.nupkg b/packages/ImageResizer.WebConfig.4.0.5/ImageResizer.WebConfig.4.0.5.nupkg new file mode 100644 index 0000000..1e99d63 Binary files /dev/null and b/packages/ImageResizer.WebConfig.4.0.5/ImageResizer.WebConfig.4.0.5.nupkg differ diff --git a/packages/ImageResizer.WebConfig.4.0.5/content/Web.config.transform b/packages/ImageResizer.WebConfig.4.0.5/content/Web.config.transform new file mode 100644 index 0000000..4dc85a2 --- /dev/null +++ b/packages/ImageResizer.WebConfig.4.0.5/content/Web.config.transform @@ -0,0 +1,17 @@ + + + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/ImageResizer.WebConfig.4.0.5/readme.txt b/packages/ImageResizer.WebConfig.4.0.5/readme.txt new file mode 100644 index 0000000..17136d7 --- /dev/null +++ b/packages/ImageResizer.WebConfig.4.0.5/readme.txt @@ -0,0 +1,9 @@ +Upgrading from a previous version of ImageResizer? You may need to correct your Web.config file. + +If you see 2 duplicate elements like the following, remove the shorter one. + +
+
+ + +You can find the release changelog at http://imageresizing.net/releases \ No newline at end of file