Image Cropping Component

October 24th, 2007

Involved in my work of Mafunet (a generic cms done in Flex), I found a big problem: when a user uploads an image to a website and this image has to have standard size, he needs to crop the image before uploading it with Photoshop or Gimp, or we have to automate the scaling of the image, losing some details and functionality. I have developed this component, that allows the user to load an image on the server, crop it on the client side, and save it again on the server with the name that I choose.

For the masking, I have changed the blend mode of the different layers. But I’m still having problems when you drag the image, it takes a little bit of time to understand the layout.

The steps…

1. I crop the image with the function of BitMapData copyPixels(bitmap data, rectangle, point).
2. Then, I encode the crop image with JPEGEncoder.
3. Once I have encoded the image, I create a post call, with the file and the name of the file that I want.
4. Once done, I download the file to see how it looks.

The example, here.

And that’s all, if someone needs source code, e-mail us.

60 Responses to “Image Cropping Component”

  1. Amit Says:

    I want to check the source code.

  2. Javi Says:

    Give me your email and I’ll send it you by email.

  3. James Morris Says:

    Hello. I am trying to build a simple crop, resize, rotate component for an application that I need. What you have done would give me a great push forward. Would you be willing to share the source.

  4. Rien Says:

    Hereby I ask for the Image Cropping Component sourcecode.

    Greetings from Belgium.

  5. Martin Says:

    Hi!! I would like to check the source code
    thanks!

  6. P Says:

    Hello there!

    may I please have the source code for this?

    Many Thanks

    P

  7. jaya krishna Says:

    I want check your source code

  8. Rahul Says:

    pls can u send me the code
    thanx in advance

  9. Meshvere Says:

    Your code seems to be really interesting, may I have a look at it please ?

    Thanks in advance.

    Hi from France ;)

  10. Janet Says:

    Hi from Mexico!

    Can you send me the source code, looks pretty interesting!

    I’ll appreciate it! ^^

  11. Luke Says:

    Please could I have a copy of the source code?

    Thanks, Luke

  12. AcWAr Says:

    This can really save my ass at work. Please, let me se the source.

    Thank you very much for it. (If you can’t show me, thanks anyway for the clue ;) )

    Hugs from Spain

  13. yenny Says:

    Hi~Would you email the source code for me,THX!

  14. Sharif Says:

    Can i please have the source code asap :) this would help me alot ! thank you :)

  15. Roshan Says:

    Please send me the code for image cropping

  16. Camille Roux Says:

    Hi,

    Nice work. It’s exactly what I needed for a website I’m making.
    Could you send me the source code please?
    What the licence of the code?

    Thank you


    Camille Roux
    http://www.camilleroux.com

  17. Henry Bugarin Says:

    Hi Guys,

    That’s exactly I was looking for the project I am working right now. Can you please send me the source codes. What’s the deal with this, is this a freeware open source or do I have to pay for it and how much?

    Thanks,

  18. udayms Says:

    Hi…. Can you mail me the source of this…. Its really cool!!!

    -Uday

  19. Francesco Says:

    Can you please send me the code? Please let me know if I can use it freely or I have to pay. Thanks a lot.

  20. bhushan Says:

    hi..willu plz mail me source code cropping image..
    thanks..

  21. bhushan Says:

    hi will u plz mail me the source code for cropping image..!

  22. Geraud Says:

    I would be very interested to have the source code of your cropping component.

    Thanks

  23. dsa157 Says:

    nice work! can I also request the source code please? thanks in advance

  24. andres Says:

    Hi, it’s a really nice work, can you send me the source code to check it out?

    thanxx

  25. vikas jagtap Says:

    Hi, I am also working on same croping component which you have done can i see that logic.

    Thanks,
    Vikas

  26. Jackie Says:

    Hereby may I have the Image Cropping Component sourcecode.

    Greetings from Jackie

  27. Ayaz Says:

    I would like to have the image Cropping Component source.

    Thanks,

    Ayaz

  28. Jose Luis Says:

    Hi need the same component can pass the source code?
    thanks

  29. Jose Luis Says:

    this comoponent use mask?

  30. Jackie Says:

    i have send you a mail for source code !
    Thanks !

  31. Tamas Tompa Says:

    Cool, exactly what i’m looking for!
    Can you send me the source code, please?
    Thanks!

  32. Balazs Vida Says:

    Hi,

    I looked for an image cropping component, exactly like yours.
    I would like to check the source code.

    Thanks

  33. lorie Says:

    Hi,

    I would like to create an image cropping module that has the capability to save the cropped image. Can you please send me the source code, please?

    Many thanks!

  34. Ruslan Says:

    hi. nice crop flex propgram, ca you send me please to the email?

  35. Martin Says:

    Hello!
    Do you sell this code? Is it available in a commercial schema?
    I would like to get the source code for this module, because I am stuck with the same problem in my project, and i would like to solve this with your solution.
    regards!

    Martin

  36. Jackie Says:

    Has anybody recevied a copy of soure code?

  37. Antonio Says:

    hi,
    I’m looking for the source code.
    is there a way I can check the source?
    this is my email for any response:
    mrjimmypage@hotmail.it

    thx

  38. goodlux Says:

    hehe this is pretty funny. Why would anyone want to see an example and not see the code?

    why not just post a link to the code to begin with.

  39. satishveera Says:

    Hi

    The example is pretty good. Can i get the source code from you.

    Thanks
    Satish

  40. Fabrizio Fabricatore Says:

    Hello, can i have the source code for this project?
    My email is buionero@hotmail.com

    Thank you very much.

  41. Dave April Says:

    Hi - can I please have the source as well? Thanks!

    Dave

  42. Mitch Says:

    Can I get the source code? info@getsomemojo.net

    THANKS :)

  43. Ravi Says:

    Can i have the source code please thanks.Looks great

  44. ClareK Says:

    Hey can i please have the source code too? Pretty please :-) thanks

  45. angel Says:

    Please could I have a copy of the source code?

    Thanks in advance, Angel

  46. Alberto Says:

    Please could I have a copy of the source code?

    I’m interesting using mask and croopping images.

    Thanks

  47. Alberto Says:

    Please send me your mail or skype.

    Thanks

  48. Dave Says:

    Hi, great concept, it’d be nice to check out your source. if possible can you send it over?

    thanks!

  49. prolover Says:

    I need the source code !
    thanks.
    Looks great

  50. prolover Says:

    my email glysyjust@yahoo.com.cn,thx

  51. Greg Says:

    Nice. Can I get a copy of the source code.
    Thanks. G

  52. Greg James Says:

    I’d like to get the source if it’s still available.

    Thanks

  53. Mathieu Ginod Says:

    Hello,

    great job for this cropping component ! I’d like to check the source code if possible.
    Thank you !

  54. Lianet Says:

    Hi, could you share your code with me? It seems to be very interesting.
    Thanks!!!

  55. ClareK Says:

    This is brill! exaactly what i am looking for. Can i please get the source code? Ive asked before but got no reply
    Thanks

  56. ClareK Says:

    If you need my email again its clare@green17creative.com

    Thanks a mill

  57. Boris Says:

    Man, that is what i’m searching for - could you plz send me this cool peace of code!!

  58. scott Says:

    It’s lovely work. Can I have the source too.
    322oops@gmail.com

  59. IvanNik Says:

    Can I get a copy of the source code too.

  60. johan Says:

    Exactly what I need - could you please email it to me (I’ve supplied my email address in the Mail field)?

    thanks!

Leave a Reply