c# - Can't get around ImageResizer error: File may be corrupted, empty, or may contain a PNG image with a single dimension greater than 65,535 pixels -
not sure i'm missing.
trying take jpg simple input[type=file] post , scrub 2 versions (1800x1800) , (400x400).
code:
stream.position = 0;//probably need 1 of these lines stream.seek(0, seekorigin.begin);//i've tried both no avail imagejob job = new imagejob(stream, origstream, new instructions("maxwidth=1800&maxheight=1800")).build();
throws:
file may corrupted, empty, or may contain png image single dimension greater 65,535 pixels.
stream
comes context.request.inputstream
i'm passing through method call. , other memorystream origstream = new memorystream()
wrapped using
i've read through of docs , of other posts reference error. of ones found on reference using plugin, i'm using no plugins.
my best guess i'm missing configuration imageresizer work, haven't been able find yet.
ps able save file if skip image processing step, image stream good, can't use imageresizer change it.
problem in input stream.
context.request.inputstream
should be:
context.request.files[0].inputstream
the inputstream
hanging off of request
contains entire body, form , all. not valid image.
Comments
Post a Comment