asp.net - Can the maximum image size of picard library be adjusted? -


i use piczard library resize images once upload them.

the code few lines:

dim resizefilter scaledresizeconstraint = new scaledresizeconstraint(1000, 800)     resizefilter.enlargesmallimages = false     resizefilter.saveprocessedimagetofilesystem(originallocation, photo.getphotopath(photoid), new jpegformatencoderparams(85)) 

however, following error in logs when upload panoramic photo:

codecarvings.piczard.invalidimagesizeexceptionpiczard error: invalid image size {width=11248, height=1600}. maximum image size is: {width=7000, height=7000}. 

is there way set maximum size piczard library accept before manipulating image?

you can use maximagesize config setting described in piczard documentation:

by default, if try load or process image size greater 5000 (width) x 5000 (height) pixels, piczard raises invalidimagesizeexception.

you can change limit editing application config file. in particular have add / edit value of following attribute:

configuration / codecarvings.piczard / coresettings / drawing / maximagesize

example config file:

<?xml version="1.0"?> <configuration>   <configsections>      <sectiongroup name="codecarvings.piczard">         <section name="coresettings" type="codecarvings.piczard.configuration.coresettingssectionhandler, codecarvings.piczard" requirepermission="false"/>      </sectiongroup>   </configsections>   <codecarvings.piczard>      <coresettings>         <drawing maximagesize="10000, 8000" />         <imagearchiver defaultloadimagevalidateimagedata="false" />      </coresettings>   </codecarvings.piczard> </configuration>  

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jquery - Keeping Kendo Datepicker in min/max range -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -