package filter.basic;

import filter.Filter;

import java.awt.*;
import java.awt.image.BufferedImage;

public class AllBlue implements Filter
{
    @Override
    public BufferedImage perform(BufferedImage img)
    {
        BufferedImage res = new BufferedImage(img.getWidth(), img.getHeight(), img.getType());
        Color blue = new Color(0, 76, 148);
        int w = img.getWidth();
        int h = img.getHeight();
        for (int i = 0; i < w; i++)
            for (int j = 0; j < h; j++)
                res.setRGB(i, j, blue.getRGB());
        return res;
    }

    @Override
    public String getName()
    {
        return "All blue";
    }
}
