Quellcode durchsuchen

* stock.c: add new error diffusion kernels: Fan, Shiau-Fan, Stucki, Burkes,

Sierra, two-row Sierra, Filter Lite.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2760 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam vor 16 Jahren
Ursprung
Commit
d12256b0f8
1 geänderte Dateien mit 75 neuen und 1 gelöschten Zeilen
  1. +75
    -1
      pipi/stock.c

+ 75
- 1
pipi/stock.c Datei anzeigen

@@ -84,7 +84,7 @@ pipi_image_t *pipi_load_stock(char const *name)
static float const myker[] =
{
0., 1., 7./16,
3./16, 5./16, 1./16
3./16, 5./16, 1./16,
};
ker = myker; w = 3; h = 2;
}
@@ -108,6 +108,80 @@ pipi_image_t *pipi_load_stock(char const *name)
};
ker = myker; w = 4; h = 3;
}
else if(!strcmp(name + 6, "fan"))
{
static float const myker[] =
{
0., 0., 1., 7./16,
1./16, 3./16, 5./16, 0.,
};
ker = myker; w = 4; h = 2;
}
else if(!strcmp(name + 6, "shiaufan"))
{
static float const myker[] =
{
0., 0., 1., 1./2,
1./8, 1./8, 1./4, 0.,
};
ker = myker; w = 4; h = 2;
}
else if(!strcmp(name + 6, "shiaufan2"))
{
static float const myker[] =
{
0., 0., 0., 1., 1./2,
1./16, 1./16, 1./8, 1./4, 0.,
};
ker = myker; w = 5; h = 2;
}
else if(!strcmp(name + 6, "stucki"))
{
static float const myker[] =
{
0., 0., 1., 8./42, 4./42,
2./42, 4./42, 8./42, 4./42, 2./42,
1./42, 2./42, 4./42, 2./42, 1./42,
};
ker = myker; w = 5; h = 3;
}
else if(!strcmp(name + 6, "burkes"))
{
static float const myker[] =
{
0., 0., 1., 4./16, 2./16,
1./16, 2./16, 4./16, 2./16, 1./16,
};
ker = myker; w = 5; h = 2;
}
else if(!strcmp(name + 6, "sierra"))
{
static float const myker[] =
{
0., 0., 1., 5./32, 3./32,
2./32, 4./32, 5./32, 4./32, 2./32,
0., 2./32, 3./32, 2./32, 0.,
};
ker = myker; w = 5; h = 3;
}
else if(!strcmp(name + 6, "sierra2"))
{
static float const myker[] =
{
0., 0., 1., 4./16, 3./16,
1./16, 2./16, 3./16, 2./16, 1./16,
};
ker = myker; w = 5; h = 2;
}
else if(!strcmp(name + 6, "lite"))
{
static float const myker[] =
{
0., 1., 1./2,
1./4, 1./4, 0.,
};
ker = myker; w = 3; h = 2;
}
else
return NULL;



Laden…
Abbrechen
Speichern