@Override
    public void setPixel(int x, int y, int c)
    {
        if (x < 0 || x >= width)
            return;
        if (y < 0 || y >= height)
            return;
        if (format == 1)
        {
            c &= 0x1F;
            c |= getPixelVal(x, y) & (~0x1F);
        }
        if (format == 6)
        {
            c &= 0x07;
            c |= getPixelVal(x, y) & (~0x07);
        }

        setPixelVal(x, y, c);
    }