Cropping and Scaling an image

  • Thread starter Thread starter JJ
  • Start date Start date
J

JJ

I have some javascipt that allows you to scale and crop an image.


However, I want the user to be able to scale and crop any number of times,
and in any order, with the possibility to undo an action. I then need to
translate the crops and scales to an image I can save (and view) via my ashx
handler routine.

The basci problem h


Whats the best way of doing this?
1) Save a copy of the image in a temporary file and work on that via the
javascript, saving each the user does a crop or scale? [then how do I handle
undo's?]
2) Use some clever javascipt to do all the multiple crops and scales in
memory then save that image over the original? [errr, how?]
3) Pass the array of actions (used in the undo javascript routine) to the
ashx handler to carry out identical actions on the image prior to saving?
[How to I pass the array, which is held in the client javasctip, to the
handler?]

A big question, I know, but if someone can suggest an approach, I'd be very
grateful,
Thanks,
JJ
 
I'm only using the jquery library at the moment for some basic loading
scripts. I'm doing all the cropping and scaling using my own javascript.
If there's a library that will do what I want, then please do tell..

Thanks,
JJ





PJ on Development said:
Hi, JJ

What kind of graphical JScript library are you using?

Paulo Santos
http://pjondevelopment.50webs.com

I have some javascipt that allows you to scale and crop an image.

However, I want the user to be able to scale and crop any number of
times,
and in any order, with the possibility to undo an action. I then need to
translate the crops and scales to an image I can save (and view) via my
ashx
handler routine.

The basci problem h

Whats the best way of doing this?
1) Save a copy of the image in a temporary file and work on that via the
javascript, saving each the user does a crop or scale? [then how do I
handle
undo's?]
2) Use some clever javascipt to do all the multiple crops and scales in
memory then save that image over the original? [errr, how?]
3) Pass the array of actions (used in the undo javascript routine) to the
ashx handler to carry out identical actions on the image prior to saving?
[How to I pass the array, which is held in the client javasctip, to the
handler?]

A big question, I know, but if someone can suggest an approach, I'd be
very
grateful,
Thanks,
JJ
 
The only one I know of is this one: http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm

Regards,

Paulo Santos
http://pjondevelopment.50webs.com

I'm only using the jquery library at the moment for some basic loading
scripts. I'm doing all the cropping and scaling using my own javascript.
If there's a library that will do what I want, then please do tell..

Thanks,
JJ



What kind of graphical JScript library are you using?
I have some javascipt that allows you to scale and crop an image.
However, I want the user to be able to scale and crop any number of
times,
and in any order, with the possibility to undo an action. I then need to
translate the crops and scales to an image I can save (and view) via my
ashx
handler routine.
The basci problem h
Whats the best way of doing this?
1) Save a copy of the image in a temporary file and work on that via the
javascript, saving each the user does a crop or scale? [then how do I
handle
undo's?]
2) Use some clever javascipt to do all the multiple crops and scales in
memory then save that image over the original? [errr, how?]
3) Pass the array of actions (used in the undo javascript routine) to the
ashx handler to carry out identical actions on the image prior to saving?
[How to I pass the array, which is held in the client javasctip, to the
handler?]
A big question, I know, but if someone can suggest an approach, I'd be
very
grateful,
Thanks,
JJ- Hide quoted text -

- Show quoted text -
 
Back
Top