Quantum image processing deals with image processing applications in quantum computing. Features of quantum computing like superposition and parallelism give quantum algorithms superiority over classical algorithms. Image filters serve an important task in image processing for applying image transformations. In this paper, we proposed an algorithm for quantum image filters with a generic structure to support different filters. Pixel intensities are represented as rotation in Y-axis of Bloch sphere. The filter is implemented as addition or subtraction of the angles in Y-axis. The proposed algorithm is able to implement different image filters similar to a classical filter. We studied and presented the performance of the filter for edge detection and smoothing operation. The results are then compared to images from a classical filter. The algorithm is further compared with other existing QIP algorithms.