4

Would anyone be able to tell me if there is a way to apply a color halftone effect to an image using JavaScript and without using WebGL. I need to create it so it can be used across multiple devices and browsers. I have found this but its using WebGL: http://evanw.github.com/webgl-filter/

Would I be able to use three.js or processing.js to achieve it?

Any help would be very appreciated.

1

1 Answer 1

2
  1. Create yourself a canvas element and put the image inside (see link from @Diodeus).

  2. Get the image data from the canvas - now you can iterate over all pixels.

  3. Apply the halftone filter on the image data. see: Algorithm to make halftone images?

  4. Update image data

BTW: I don't recomment to do this on the client machine. Image Processing requires some processing power which may not be available on the client (e.g. Smartphone). Better do it ONCE on the server with e.g. ImageMagick.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.