Cropping and Scaling an image

Discussion in 'ASP .Net' started by JJ, Nov 19, 2007.

  1. JJ

    JJ Guest

    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
    JJ, Nov 19, 2007
    #1
    1. Advertising

  2. Hi, JJ

    What kind of graphical JScript library are you using?

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

    On Nov 19, 10:05 am, "JJ" <> wrote:
    > 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
    PJ on Development, Nov 19, 2007
    #2
    1. Advertising

  3. JJ

    JJ Guest

    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" <> wrote in message
    news:...
    > Hi, JJ
    >
    > What kind of graphical JScript library are you using?
    >
    > Paulo Santos
    > http://pjondevelopment.50webs.com
    >
    > On Nov 19, 10:05 am, "JJ" <> wrote:
    >> 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

    >
    JJ, Nov 19, 2007
    #3
  4. The only one I know of is this one: http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm

    Regards,

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

    On Nov 19, 10:49 am, "JJ" <> wrote:
    > 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" <> wrote in messagenews:...
    >
    >
    >
    > > Hi, JJ

    >
    > > What kind of graphical JScript library are you using?

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

    >
    > > On Nov 19, 10:05 am, "JJ" <> wrote:
    > >> 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 -
    PJ on Development, Nov 19, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. FrankV
    Replies:
    0
    Views:
    383
    FrankV
    Nov 8, 2005
  2. Andrew Neiderer

    JAI example of cropping

    Andrew Neiderer, Sep 14, 2005, in forum: Java
    Replies:
    2
    Views:
    10,001
    Martin Trobec
    Sep 17, 2005
  3. Darrel

    Cropping an image

    Darrel, Apr 23, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    483
    Kevin Spencer
    Apr 23, 2006
  4. Replies:
    5
    Views:
    92
    Dennis Lee Bieber
    May 7, 2014
Loading...

Share This Page