preparing DICOM entry
This commit is contained in:
@@ -356,7 +356,7 @@ switch (idFx) {
|
||||
retval = des_bords_sombres_a(image, 160);
|
||||
break;
|
||||
case CR_bsombrb: /* experiment ! */
|
||||
retval = des_bords_sombres_b(image, 100);
|
||||
retval = des_bords_sombres_b(image, 120);
|
||||
break;
|
||||
|
||||
case CR_vsglitch:
|
||||
|
||||
@@ -53,17 +53,29 @@ return -1;
|
||||
static int pixel_trinitron(FloatImg *pimg, int pos[4], float *fvals)
|
||||
{
|
||||
int x, y, pline, off;
|
||||
int ym;
|
||||
|
||||
fimg_clear_rectangle(pimg, pos);
|
||||
|
||||
for (y=pos[1]; y<pos[1]+pos[3]; y++) {
|
||||
ym = pos[1]+pos[3]-1;
|
||||
|
||||
#define FDIM 0.60
|
||||
|
||||
for (y=pos[1]; y<ym; y++) {
|
||||
pline = y*pimg->width;
|
||||
for (x=pos[0]+2; x<(pos[0]+pos[2]-2); x++) {
|
||||
off = pline + x;
|
||||
for (x=0; x<5; x++) {
|
||||
off = pline + (x+pos[0]);
|
||||
/* wtf i'm doing here ? */
|
||||
pimg->R[off] = fvals[0];
|
||||
pimg->G[off] = fvals[1];
|
||||
pimg->B[off] = fvals[2];
|
||||
if ( (pos[1]==y) || (ym-1==y) ) {
|
||||
pimg->R[off] = fvals[0] * FDIM;
|
||||
pimg->G[off+5] = fvals[1] * FDIM;
|
||||
pimg->B[off+10] = fvals[2] * FDIM;
|
||||
}
|
||||
else {
|
||||
pimg->R[off] = fvals[0];
|
||||
pimg->G[off+5] = fvals[1];
|
||||
pimg->B[off+10] = fvals[2];
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user