Learning
Learning

Reputation: 20051

Scale image using imageresizing.net-ImageResizer

I am trying to integrate on one of the website to imageresizer and i am able to make it work but i am not sure about the security of this ImageResizer library as on following page it show few basic commands for resizing images which can be passed as parameter as show on http://imageresizing.net/docs/basics

My concern is that when we pass command variable as parameter in image path will it execute all commands like crop

example

Downsize image from 600x300 to 150x75 using following

< img  src="images/imageName.jpg?width=150">

Above line will resize image to 150x75 and quality is even good.

Now if i make change to above example and add mode=crop

 < img  src='images/imageName.jpg?width=150&mode=crop'>

will this actually crop my original image to 150x75. Just want to clarify as i have implemented as

<httpModules>
  <!-- This is for IIS5, IIS6, and IIS7 Classic, and Cassini/VS Web Server-->
  <add name="ImageResizingModule" type="ImageResizer.InterceptModule"/>
</httpModules>

Upvotes: 1

Views: 535

Answers (1)

Scott Salyer
Scott Salyer

Reputation: 2475

I am just starting to research this tool so I may be a little off base here, but I think you're asking if when you use this tool whether it crops the original image (meaning it overwrites the original with this newly cropped version). As I understand it, everything they do is in memory and does not modify the original file. Otherwise if you needed to go from width=150 to width=200, you would lose that opportunity.

Upvotes: 1

Related Questions