resize image from byte array at session
There is an article about preview image from byte array at the session.
http://www.charith.gunasekara.web-sphere.co.uk/2010/09/how-to-show-selected-image-file-without.html
Can we resize the image from this byte array at the session before save to server. this byte didnt save to db or file yet. it will read from session.
is it possible.
-
Client-side resizing is both slow and low-quality. Using on a 500KB jpeg is possible, but not a 4-5MB once. I don't know where to point you either; there are a few browser-specific libraries but nothing very usable.
Using session storage for bitmap data is a definite no-no. If you need to scale, you might consider using Amazon S3 with their auto-expire feature set to 24 hours. This way the user will upload directly to S3, and your server will download and process the image exactly once, without waiting on user upload latency, or having to store anything to disk.
-
cuneyt commented
Because of web traffic, i want to resize before sending to the server. for example an image that is 4-5 mb is saved to the server and this will scale at server side. i dont use this quality image any more at server after scale and i dont want to pay for bantwidth that i wont use for any profit. is this reasonable? or applicable? maybe there is another sides of issue, i dont know security maybe.
there is clientside image resizing solution but i dont know, i am searching diffirent solution for this.
I asked beacuse of this.
Thanks. -
What that article suggests is a horrible idea - holding images in memory is neither scalable, sane, stable, or reliable.
What's wrong with temporary files?
While you *can* do that with ImageResizer and an IVirtualImageProvider plugin, I highly recommend against it.