Cropping and Scaling an image

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
 
J

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
 
P

PJ on Development

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 -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top