Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Filtering in Canvas2D and CanvasMap #336

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

tlecomte
Copy link
Contributor

Dear Icy masters,

Here is a pull request for filtering in canvas2d and canvasMap.

-Commit 629c5b2 enables bicubic interpolation on the canvas when the view is not moving.

-Commut 652ebf3 reduces the scale limit between nearest-neighbour and bicubic. Before, NR was used when the scale is larger than 400%. It is now used when the scale is larger than 300%. I find it clearer.

-Commits 83e1991 and 242ae87 add a downsampling step when the scale is smaller than 1. This removes aliasing artefacts. The downsampling is a high-quality Lanczos3 filter provided by a library named java-image-scaling. The correspoding jar has to be added to the build path ! It can be downloaded from there: http://code.google.com/p/java-image-scaling/

  • Finally, commit 20da898 enables the downsampling filter and the bicubic interpolation on the CanvasMap. I think it looks much nicer...

What do you think about these modifications ?

Timothée

@tlecomte
Copy link
Contributor Author

For comparison, here is a screenshot:

http://i.imgur.com/owYFC.png

On the left, after the modifications. On the right, before (and filtering option disabled).

@Stephane-D
Copy link
Contributor

Because of synchronized viewer we need to apply filter only on idle time (use a timer in ImageCache).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants