Fixed bug in ImageLoader that caused the allocated image to be too big.
Work in progress on filter generation + tests.