imageresizer

Determine current size of image using ImageResizer.net

邮差的信 提交于 2019-12-07 05:57:55
问题 We have recently started using ImageResizer.Net over GDI+ for dynamically resizing images on our ASP.NET MVC 4 application. Is there a way, using only ImageResizer, to determine the actual resolution(DPI,PPI, whatever you want to call it), of the image (which is read in as a byte array). We currently have a workflow like this, to resize the image to a specified lower resolution when needed: //pseudo-code var image = (Bitmap)Bitmap.FromStream(contentStream) var resX = image

DiskCache plugin imageresizer in MVC3

故事扮演 提交于 2019-12-06 16:09:22
问题 For my MVC project (Image Server Application), I cannot do caching using imageresizer. I can access my images like this and the image source could be either FileSystem/Database (Dependency injeciton) : localhost/images/123.jpg?width=500 localhost/images/123?width=500 I have an MVC 3 project with routes like routes.RouteExistingFiles = true; routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("favicon.ico"); routes.MapRoute( "ImagesWithExtension", // Route name "images/

Receive 400 Bad Request from Image Resizer request in Azure

≯℡__Kan透↙ 提交于 2019-12-06 06:09:10
ImageResizer is running as an Azure virtual application (after ImageResizer hotfix). This runs fine in Azure emulation but is having problems in Azure cloud. Image Resizer is working fine if no query string arguments are specified and the url redirects to blob storage, but if a query string argument is specified then I receive a 400 "Bad Request" error. Below is a screenshot of my browser: My Azure instance is running Windows Server 2012. I have also disabled the DiskCache plugin to reduce the problem. I got the same problem as You. I used fiddler to see if I could figure out what went wrong

DiskCache plugin imageresizer in MVC3

陌路散爱 提交于 2019-12-04 19:30:12
For my MVC project (Image Server Application), I cannot do caching using imageresizer. I can access my images like this and the image source could be either FileSystem/Database (Dependency injeciton) : localhost/images/123.jpg?width=500 localhost/images/123?width=500 I have an MVC 3 project with routes like routes.RouteExistingFiles = true; routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("favicon.ico"); routes.MapRoute( "ImagesWithExtension", // Route name "images/{imageName}.{extension}/", // URL with parameters new { controller = "Home", action = "ViewImageWithExtension"

Resizing image proportionally in ASP.NET C# by specifying either Height or Width

≡放荡痞女 提交于 2019-12-03 09:07:59
I need a code that will allow me to resize images, but with the following functionality: 1) resize image upon upload 2) Resize image proportionally by specifying either height or width. Note: Should be done in ASP.NET C# For example: The function should get the a width OR a height, and resize the image proportionally for the give height OR Width. Let's say that the image is 400(w)x100(h). I want to tell the function to resize the image to a specific height, let's say 80px. The function should resize the image proportionally while setting the image height to 80px and the width accordingly.

ImageResizer for Azure using AzureReader2 plugin not resizing

一世执手 提交于 2019-12-01 11:25:19
EDIT I got it to work however I had to add the RemoteReader plugin. When I remove the AzureReader2 plugin from my project it still works which makes sense however what is the AzureReader2 plugin benefiting me? ORIGINAL QUESTION I have done everything that has been outline here (including the comments) but can't seem to figure out why I can't resize images on the fly with this plugin for imageresizer. This is what my web.config entry under the element looks like: <add name="AzureReader2" prefix="~/img/" connectionString="DefaultEndpointsProtocol=https;AccountName=[Account];AccountKey=[key]"

If using ImageResizer with Azure blobs do I need the AzureReader2 plugin?

青春壹個敷衍的年華 提交于 2019-12-01 08:01:33
I'm working on a personal project to manage users of my club, it's hosted on the free Azure package (for now at least), partly as an experiment to try out Azure. Part of creating their records is to add a photo, so I've got a Contact Card view that lets me see who they are, when they came and a photo. I have installed ImageResizer and it's really easy to resize the 10MP photos from my camera and save them to the file system locally, but it seems that for Azure I need to use their Blobs to Upload Pictures to Windows Azure Web Sites , and that's new to me. The documentation on ImageResizer says

If using ImageResizer with Azure blobs do I need the AzureReader2 plugin?

你。 提交于 2019-12-01 06:24:00
问题 I'm working on a personal project to manage users of my club, it's hosted on the free Azure package (for now at least), partly as an experiment to try out Azure. Part of creating their records is to add a photo, so I've got a Contact Card view that lets me see who they are, when they came and a photo. I have installed ImageResizer and it's really easy to resize the 10MP photos from my camera and save them to the file system locally, but it seems that for Azure I need to use their Blobs to

How to use the autorotate plugin in ImageResizer

↘锁芯ラ 提交于 2019-12-01 05:50:49
How do I use the AutoRotate plugin in a c# console application? I thought I'd be able to do something like settings.AutoRotate = true; like I can change the fit mode to use the seam carving plugin. I've tried settings.Add("autorotate","true") to the keycollection, as well as other keynames AutoRotate and autoRotate . I'm using it in a simple method. new AutoRotate().Install(ImageResizer.Configuration.Config.Current); ... protected static Image ResizeImage(Image image, double scaleFactor) { var settings = new ResizeSettings { Scale = ScaleMode.Both, Width = (int)Math.Floor(Image.Width *

How to use the autorotate plugin in ImageResizer

霸气de小男生 提交于 2019-12-01 03:09:51
问题 How do I use the AutoRotate plugin in a c# console application? I thought I'd be able to do something like settings.AutoRotate = true; like I can change the fit mode to use the seam carving plugin. I've tried settings.Add("autorotate","true") to the keycollection, as well as other keynames AutoRotate and autoRotate . I'm using it in a simple method. new AutoRotate().Install(ImageResizer.Configuration.Config.Current); ... protected static Image ResizeImage(Image image, double scaleFactor) {