ericleong / fisheye.js

A javascript library for applying radial lens distortion to images using WebGL.
https://ericleong.github.io/fisheye.js
MIT License
80 stars 9 forks source link

Image cut top-bottom #2

Open razvanphp opened 6 years ago

razvanphp commented 6 years ago

Hey, thanks again for this great script.

I've found a small bug, when the image is is not square, the distorsion goes outside of the canvas size, cutting a little bit from the top and bottom.

Here's a screenshot: screen shot 2018-02-27 at 14 12 04

ericleong commented 6 years ago

I think the best solution to this is to expose a method that returns the dimensions of the distorted image, that way the desired canvas can be provided to the library. I'll look into this.