-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I've just created a module that allows me to generate a mapping function for ndarray-warp, to distort an image like imagemagick's shepard's distortion: https://github.com/ismay/generate-map
It allows you to specify a set of coordinates and their intended displacement, which results in images like these:
(warped with these parameters: [[210, 296, 100, 0], [101, 97, -30, -10], [77, 473, 50, -100]], see test here: https://github.com/ismay/generate-map/blob/master/lib/index.test.js)
Everything works as expected, but I encountered two things that I wasn't able to solve:
-
Output is rotated 90 degrees counterclockwise (also when just passing an image through ndarray-warp without doing anything). Seems like a bug? Or am I doing something wrong here?
-
Another thing that I noticed and could not figure out from this project's documentation is that the output is grayscale, even though the original image is in color. Is there anything I could do to output color images?
Thanks!
