-1

I want to crop images .. I get the x,y,w,h data by JCrop plugin .. So i want just to know if is there any technique to crop the image in javascript based on my (x,y,w,h) data . Thank you .

AiD
  • 977
  • 3
  • 15
  • 41
  • Have you tried anything yourself? What about searched for examples? No one is going to just write your code for you. – Mike Cluck Dec 19 '16 at 19:02
  • I want just to know if it's possible by js or i have to search for an other plugin to do this – AiD Dec 19 '16 at 19:04
  • Yes it's possible in JS. Plugins do not change what's possible with JS. In fact, jQuery plugins are written in JS. – Mike Cluck Dec 19 '16 at 19:05

1 Answers1

1

Have you tried getImageData? See:

https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas#Getting_the_pixel_data_for_a_context

rivimey
  • 921
  • 1
  • 7
  • 24
  • To use this .. i have to download an external library ? or it's included in js ? – AiD Dec 19 '16 at 23:18