+Rotate
+======
+
+Imageprocessor can rotate your images without clipping. You can also optionally fill the background color for image types without transparency.
+
+e.g.
+
+
+
+
+Quality
+======
+
+Whilst Imageprocessor delivers an excellent quality/filesize ratio it also allows you to change the quality of jpegs on-the-fly.
+
+e.g.
+
+
+
+Vignette
+======
+
+Imageprocessor can also add a vignette effect to images.
+
+e.g.
+
+
diff --git a/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs b/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs
index ccd1a7325..f28724d3a 100644
--- a/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs
+++ b/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs
@@ -123,40 +123,35 @@ namespace ImageProcessor.Web.HttpModules
}
// Process the image.
- if (isRemote)
+ using (ImageFactory imageFactory = new ImageFactory())
{
- Uri uri = new Uri(path);
- RemoteFile remoteFile = new RemoteFile(uri, false);
-
- using (MemoryStream memoryStream = new MemoryStream())
+ if (isRemote)
{
- using (Stream responseStream = remoteFile.GetWebResponse().GetResponseStream())
+ Uri uri = new Uri(path);
+ RemoteFile remoteFile = new RemoteFile(uri, false);
+
+ using (MemoryStream memoryStream = new MemoryStream())
{
- if (responseStream != null)
+ using (Stream responseStream = remoteFile.GetWebResponse().GetResponseStream())
{
- responseStream.CopyTo(memoryStream);
- // Process the image.
- using (ImageFactory imageFactory = new ImageFactory())
+ if (responseStream != null)
{
+ responseStream.CopyTo(memoryStream);
+
imageFactory.Load(memoryStream)
- .AddQueryString(queryString)
- .Format(ImageUtils.GetImageFormat(imageName))
- .AutoProcess()
- .Save(cachedPath);
+ .AddQueryString(queryString)
+ .Format(ImageUtils.GetImageFormat(imageName))
+ .AutoProcess().Save(cachedPath);
}
}
}
}
- }
- else
- {
- using (ImageFactory imageFactory = new ImageFactory())
+ else
{
imageFactory.Load(fullPath).AutoProcess().Save(cachedPath);
}
}
-
// Add 1 to the counter
cachedImageCounter += 1;
@@ -255,4 +250,4 @@ namespace ImageProcessor.Web.HttpModules
}
#endregion
}
-}
+}
\ No newline at end of file
diff --git a/src/ImageProcessor.Web/ImageFactoryExtensions.cs b/src/ImageProcessor.Web/ImageFactoryExtensions.cs
index d22b8282a..23eaa1eb7 100644
--- a/src/ImageProcessor.Web/ImageFactoryExtensions.cs
+++ b/src/ImageProcessor.Web/ImageFactoryExtensions.cs
@@ -24,6 +24,8 @@ namespace ImageProcessor.Web
///
public static class ImageFactoryExtensions
{
+ private static readonly object SyncLock = new object();
+
///
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
*@
\ No newline at end of file
diff --git a/src/Test/Test/Views/Shared/_Layout.cshtml b/src/Test/Test/Views/Shared/_Layout.cshtml
index 09632c130..3e05d2770 100644
--- a/src/Test/Test/Views/Shared/_Layout.cshtml
+++ b/src/Test/Test/Views/Shared/_Layout.cshtml
@@ -8,17 +8,16 @@