summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-11-25 10:16:54 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-11-25 10:16:54 +0100
commit1b1126bd023a2bb92699773a1867358067dabcb8 (patch)
tree6fd56d034e5a154c7992e7855d61691cecd043c4 /render
parentcb5c7cec4aa1946f75dc3d408eb7f1051f3fb3d4 (diff)
parentf6b8e0eae4374f339487a33e3e4fe5462d5816e1 (diff)
Update upstream source from tag 'upstream/2.0.0'
Update to upstream version '2.0.0' with Debian dir e866e6e75661017faaa5331becda76021407390b
Diffstat (limited to 'render')
-rwxr-xr-x[-rw-r--r--]render/Jamfile0
-rwxr-xr-x[-rw-r--r--]render/License.txt0
-rwxr-xr-x[-rw-r--r--]render/Readme.txt0
-rwxr-xr-x[-rw-r--r--]render/afiles0
-rwxr-xr-x[-rw-r--r--]render/makecharts.ksh0
-rwxr-xr-x[-rw-r--r--]render/render.c13
-rwxr-xr-x[-rw-r--r--]render/render.h0
-rwxr-xr-x[-rw-r--r--]render/screens.h0
-rwxr-xr-x[-rw-r--r--]render/thscreen.c0
-rwxr-xr-x[-rw-r--r--]render/thscreen.h0
-rwxr-xr-x[-rw-r--r--]render/timage.c2
11 files changed, 10 insertions, 5 deletions
diff --git a/render/Jamfile b/render/Jamfile
index 7c9704b..7c9704b 100644..100755
--- a/render/Jamfile
+++ b/render/Jamfile
diff --git a/render/License.txt b/render/License.txt
index a871fcf..a871fcf 100644..100755
--- a/render/License.txt
+++ b/render/License.txt
diff --git a/render/Readme.txt b/render/Readme.txt
index 6ed3ea7..6ed3ea7 100644..100755
--- a/render/Readme.txt
+++ b/render/Readme.txt
diff --git a/render/afiles b/render/afiles
index 26a7384..26a7384 100644..100755
--- a/render/afiles
+++ b/render/afiles
diff --git a/render/makecharts.ksh b/render/makecharts.ksh
index 98ceb11..98ceb11 100644..100755
--- a/render/makecharts.ksh
+++ b/render/makecharts.ksh
diff --git a/render/render.c b/render/render.c
index d6ab108..b4acb6c 100644..100755
--- a/render/render.c
+++ b/render/render.c
@@ -84,7 +84,7 @@ static void cvt_Lab_to_CIELAB16(double *out, double *in) {
out[0] = 100.0;
out[0] = out[0] / 100.0 * 65535.0;
- out[1] = in[1];
+ out[1] = 256.0 * in[1];
if (out[1] < -32768.0)
out[1] = -32768.0;
else if (out[1] > 32767.0)
@@ -92,7 +92,7 @@ static void cvt_Lab_to_CIELAB16(double *out, double *in) {
if (out[1] < 0.0)
out[1] = 65536.0 + out[1];
- out[2] = in[2];
+ out[2] = 256.0 * in[2];
if (out[2] < -32768.0)
out[2] = -32768.0;
else if (out[2] > 32767.0)
@@ -733,6 +733,7 @@ static int render2d_write(
for (j = 0; j < s->ncc; j++)
pixv1[x][j] = rv[j];
pixv1[x][PRIX2D] = rv[PRIX2D];
+//printf("x %d y %d, set %f %f %f ix %f\n",x,y,rv[0],rv[1],rv[2], rv[PRIX2D]);
}
pthp = &th->xl;
th = th->xl;
@@ -827,7 +828,9 @@ static int render2d_write(
/* Translate from render value to output pixel value */
if (s->dpth == bpc8_2d) {
- /* if dithering and dithering all or found FG in line */
+
+ /* if dithering and dithering all or found FG in line, */
+ /* start with 16 bit values to dither from */
if (s->dither) {
unsigned short *p = ((unsigned short *)dithbuf16) + x * s->ncc;
@@ -839,6 +842,8 @@ static int render2d_write(
for (j = 0; j < s->ncc; j++)
p[j] = (int)(65535.0 * cc[j] + 0.5);
}
+
+ /* Else quantize to 8 bits */
} else {
unsigned char *p = ((unsigned char *)outbuf) + x * s->ncc;
if (s->csp == lab_2d) {
@@ -932,6 +937,7 @@ static int render2d_write(
#endif
if (fmt == tiff_file) {
#ifdef RENDER_TIFF
+
if (TIFFWriteScanline(wh, outbuf, y, 0) < 0) {
a1loge(g_log, 1, "Failed to write TIFF file '%s' line %d\n",filename,y);
return 1;
@@ -1230,7 +1236,6 @@ static int rectvs2d_rend(prim2d *ss, color2d rv, double x, double y) {
rv[j] = 0.0;
for (i = 0; i < 4; i++)
rv[j] += b[i] * s->c[i][j];
- rv[j] = rv[j];
}
rv[PRIX2D] = s->ix;
diff --git a/render/render.h b/render/render.h
index 26b7028..26b7028 100644..100755
--- a/render/render.h
+++ b/render/render.h
diff --git a/render/screens.h b/render/screens.h
index 353597b..353597b 100644..100755
--- a/render/screens.h
+++ b/render/screens.h
diff --git a/render/thscreen.c b/render/thscreen.c
index 7c115f3..7c115f3 100644..100755
--- a/render/thscreen.c
+++ b/render/thscreen.c
diff --git a/render/thscreen.h b/render/thscreen.h
index f14a8a4..f14a8a4 100644..100755
--- a/render/thscreen.h
+++ b/render/thscreen.h
diff --git a/render/timage.c b/render/timage.c
index 20c999a..54ce04f 100644..100755
--- a/render/timage.c
+++ b/render/timage.c
@@ -39,7 +39,7 @@
#include "render.h"
#define DEF_DPI 200
-#define DITHER 0x8002 /* [0] 1 for test 8 bit dithering, 2 for test error diffusion */
+#define DITHER 0 /* [0] 1 for test 8 bit dithering, 2 for test error diffusion */
/* 0x8001 for dithering FG only, 0x8002 for err. diff. FG only */
#undef PNG_MEM /* Test PNG save to memory */