NEW RELEASE for other systems
This commit is contained in:
@@ -92,6 +92,7 @@ FimgFilter3x3 lowpass = {
|
||||
};
|
||||
|
||||
FimgFilter3x3 hipass = {
|
||||
/* there was a bug with this filter */
|
||||
{
|
||||
-1.0, -1.0, -1.0,
|
||||
-1.0, 9.0, -1.0,
|
||||
@@ -101,6 +102,7 @@ FimgFilter3x3 hipass = {
|
||||
};
|
||||
|
||||
FimgFilter3x3 diagonal = {
|
||||
/* there was a bug with this filter */
|
||||
{
|
||||
4.0, 1.0, 0.0,
|
||||
1.0, 0.0, -1.0,
|
||||
@@ -354,8 +356,9 @@ switch (idFx) {
|
||||
retval = des_bords_sombres_a(image, 160);
|
||||
break;
|
||||
case CR_bsombrb: /* experiment ! */
|
||||
retval = des_bords_sombres_b(image, 160);
|
||||
retval = des_bords_sombres_b(image, 100);
|
||||
break;
|
||||
|
||||
case CR_vsglitch:
|
||||
/* please make this function more tweakable */
|
||||
retval = vertical_singlitch(image, 290+rand()%45,
|
||||
|
||||
@@ -56,7 +56,13 @@ int x, y, pline, off;
|
||||
|
||||
for (y=pos[1]; y<pos[1]+pos[3]; y++) {
|
||||
pline = y*pimg->width;
|
||||
for (x=pos[0]+2; x<pos[0]+pos[2]-2; x++) {
|
||||
#if 0
|
||||
for (x=0; x<(pos[0]+pos[2]); x++) {
|
||||
off = pline + x;
|
||||
pimg->R[off]=pimg->G[off]=pimg->B[off]=0.0;
|
||||
}
|
||||
#endif
|
||||
for (x=pos[0]+2; x<(pos[0]+pos[2]-2); x++) {
|
||||
off = pline + x;
|
||||
/* wtf i'm doing here ? */
|
||||
pimg->R[off] = fvals[0];
|
||||
@@ -320,21 +326,39 @@ return 0;
|
||||
/* -------------------------------------------------------------- */
|
||||
/* nouveau Mon 10 May 2021 08:46:02 PM CEST
|
||||
* chez Eric 1KA */
|
||||
int des_bords_sombres_b(FloatImg *pimg, int offset)
|
||||
int des_bords_sombres_b(FloatImg *pimg, int nbre)
|
||||
{
|
||||
|
||||
int idx, x, foo;
|
||||
float coef, *fptr;
|
||||
#if DEBUG_LEVEL
|
||||
fprintf(stderr, ">>> %s ( %p %d )\n", __func__, pimg, offset);
|
||||
#endif
|
||||
|
||||
if (offset<0 || offset>=pimg->width) {
|
||||
fprintf(stderr, "%s: offset %d is bad\n", __func__, offset);
|
||||
return -66;
|
||||
for (idx=0; idx<nbre; idx++) {
|
||||
|
||||
coef = (float)idx / (float)nbre;
|
||||
|
||||
fptr = pimg->R + (idx*pimg->width);
|
||||
for (x=0; x<pimg->width; x++) *fptr++ *= coef;
|
||||
fptr = pimg->G + (idx*pimg->width);
|
||||
for (x=0; x<pimg->width; x++) *fptr++ *= coef;
|
||||
fptr = pimg->B + (idx*pimg->width);
|
||||
for (x=0; x<pimg->width; x++) *fptr++ *= coef;
|
||||
|
||||
foo = (pimg->height-idx) - 1;
|
||||
fptr = pimg->R + (foo*pimg->width);
|
||||
// fprintf(stderr, "%5d %9.3f %p\n", foo, coef, fptr);
|
||||
for (x=0; x<pimg->width; x++) *fptr++ *= coef;
|
||||
fptr = pimg->G + (foo*pimg->width);
|
||||
for (x=0; x<pimg->width; x++) *fptr++ *= coef;
|
||||
fptr = pimg->B + (foo*pimg->width);
|
||||
for (x=0; x<pimg->width; x++) *fptr++ *= coef;
|
||||
|
||||
}
|
||||
|
||||
fprintf(stderr, "ERROR: %s not implemented\n", __func__);
|
||||
// fprintf(stderr, "WARNING: %s badly implemented\n", __func__);
|
||||
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
/* -------------------------------------------------------------- */
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user