Framework for image filters, alongwith an auto-trim filter