migrate filter to XImage class