mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-06 22:04:12 +01:00
- fixed speckles (white dots) on dithered images (bug still present on the
PowerPC architecture, because on LinuxPPC char is unsigned by default, not signed like on the other platforms). Bug fixed by Philip Derrin <philipd@student.unsw.edu.au> - miscelaneous bug fixes We would like people with cvs access experimenting the white 'speckles' on images to test if they still have the problem.
This commit is contained in:
@@ -7,6 +7,11 @@
|
||||
- Small speed improvement for 24 and 32 bpp, if internal converter is used
|
||||
- Small speed improvement for generating gradients.
|
||||
- Fixed RSaveXPM() to output correct xpm images.
|
||||
- fixed speckles (white dots) on dithered images (bug still present on the
|
||||
PowerPC architecture, because on LinuxPPC char is unsigned by default, not
|
||||
signed like on the other platforms).
|
||||
Bug fixed by Philip Derrin <philipd@student.unsw.edu.au>
|
||||
|
||||
|
||||
- fixed code dependant on the order of evaluation. code like
|
||||
*ptr++ = *ptr++ = *ptr++ = color;
|
||||
|
||||
@@ -139,7 +139,7 @@ computeStdTable(unsigned int mult, unsigned int max)
|
||||
|
||||
static void
|
||||
convertTrueColor_generic(RXImage *ximg, RImage *image,
|
||||
char *err, char *nerr,
|
||||
signed char *err, signed char *nerr,
|
||||
const short *rtable,
|
||||
const short *gtable,
|
||||
const short *btable,
|
||||
@@ -148,7 +148,7 @@ convertTrueColor_generic(RXImage *ximg, RImage *image,
|
||||
const unsigned short goffs,
|
||||
const unsigned short boffs)
|
||||
{
|
||||
char *terr;
|
||||
signed char *terr;
|
||||
int x, y, r, g, b;
|
||||
int pixel;
|
||||
int rer, ger, ber;
|
||||
@@ -330,7 +330,7 @@ image2TrueColor(RContext *ctx, RImage *image)
|
||||
|
||||
static void
|
||||
convertPseudoColor_to_8(RXImage *ximg, RImage *image,
|
||||
char *err, char *nerr,
|
||||
signed char *err, signed char *nerr,
|
||||
const short *rtable,
|
||||
const short *gtable,
|
||||
const short *btable,
|
||||
@@ -338,7 +338,7 @@ convertPseudoColor_to_8(RXImage *ximg, RImage *image,
|
||||
unsigned long *pixels,
|
||||
int cpc)
|
||||
{
|
||||
char *terr;
|
||||
signed char *terr;
|
||||
int x, y, r, g, b;
|
||||
int pixel;
|
||||
int rer, ger, ber;
|
||||
@@ -545,8 +545,8 @@ image2StandardPseudoColor(RContext *ctx, RImage *image)
|
||||
}
|
||||
} else {
|
||||
/* dither */
|
||||
short *err, *nerr;
|
||||
short *terr;
|
||||
signed short *err, *nerr;
|
||||
signed short *terr;
|
||||
int rer, ger, ber;
|
||||
int x1, ofs;
|
||||
|
||||
@@ -842,6 +842,14 @@ hermesConvert(RContext *context, RImage *image)
|
||||
dest.indexed = 1;
|
||||
dest.has_colorkey = 0;
|
||||
|
||||
/*printf("source r=0x%x, g=0x%x, b=0x%x, a=0x%x, b=%d, i=%d, c=%d\n",
|
||||
source.r, source.g, source.b, source.a,
|
||||
source.bits, source.indexed, source.has_colorkey);
|
||||
printf("dest r=0x%x, g=0x%x, b=0x%x, a=0x%x, b=%d, i=%d, c=%d\n",
|
||||
dest.r, dest.g, dest.b, dest.a,
|
||||
dest.bits, dest.indexed, dest.has_colorkey);
|
||||
*/
|
||||
|
||||
Hermes_ConverterRequest(context->hermes_data->converter, &source, &dest);
|
||||
|
||||
Hermes_ConverterPalette(context->hermes_data->converter,
|
||||
|
||||
@@ -115,7 +115,7 @@ renderHGradient(unsigned width, unsigned height, int r0, int g0, int b0,
|
||||
int rf, int gf, int bf)
|
||||
{
|
||||
int i;
|
||||
unsigned long r, g, b, dr, dg, db;
|
||||
long r, g, b, dr, dg, db;
|
||||
unsigned lineSize = width*3;
|
||||
RImage *image;
|
||||
unsigned char *ptr;
|
||||
@@ -170,7 +170,7 @@ renderVGradient(unsigned width, unsigned height, int r0, int g0, int b0,
|
||||
int rf, int gf, int bf)
|
||||
{
|
||||
int i, j;
|
||||
unsigned long r, g, b, dr, dg, db;
|
||||
long r, g, b, dr, dg, db;
|
||||
RImage *image;
|
||||
unsigned char *ptr;
|
||||
unsigned char rr, gg, bb;
|
||||
@@ -280,7 +280,7 @@ static RImage*
|
||||
renderMHGradient(unsigned width, unsigned height, RColor **colors, int count)
|
||||
{
|
||||
int i, j, k;
|
||||
unsigned long r, g, b, dr, dg, db;
|
||||
long r, g, b, dr, dg, db;
|
||||
unsigned lineSize = width*3;
|
||||
RImage *image;
|
||||
unsigned char *ptr;
|
||||
@@ -347,7 +347,7 @@ static RImage*
|
||||
renderMVGradient(unsigned width, unsigned height, RColor **colors, int count)
|
||||
{
|
||||
int i, j, k;
|
||||
unsigned long r, g, b, dr, dg, db;
|
||||
long r, g, b, dr, dg, db;
|
||||
unsigned lineSize = width*3;
|
||||
RImage *image;
|
||||
unsigned char *ptr, *tmp;
|
||||
@@ -498,8 +498,8 @@ RRenderInterwovenGradient(unsigned width, unsigned height,
|
||||
RColor colors2[2], int thickness2)
|
||||
{
|
||||
int i, j, k, l, ll;
|
||||
unsigned long r1, g1, b1, dr1, dg1, db1;
|
||||
unsigned long r2, g2, b2, dr2, dg2, db2;
|
||||
long r1, g1, b1, dr1, dg1, db1;
|
||||
long r2, g2, b2, dr2, dg2, db2;
|
||||
RImage *image;
|
||||
unsigned char *ptr;
|
||||
unsigned char rr, gg, bb;
|
||||
|
||||
12
wrlib/view.c
12
wrlib/view.c
@@ -36,15 +36,19 @@ main(int argc, char **argv)
|
||||
puts(RMessageForError(RErrorCode));
|
||||
exit(1);
|
||||
}
|
||||
/*
|
||||
|
||||
if (argc > 2) {
|
||||
RImage *tmp = img;
|
||||
|
||||
img = RSmoothScaleImage(tmp, tmp->width*atol(argv[2]),
|
||||
tmp->height*atol(argv[2]));
|
||||
img = RScaleImage(tmp, tmp->width*atol(argv[2]),
|
||||
tmp->height*atol(argv[2]));
|
||||
/*img = RSmoothScaleImage(tmp, tmp->width*atol(argv[2]),
|
||||
tmp->height*atol(argv[2]));
|
||||
*/
|
||||
|
||||
RReleaseImage(tmp);
|
||||
}
|
||||
*/
|
||||
|
||||
#if 0
|
||||
if (argc > 2) {
|
||||
img = RScaleImage(img, img->width*atof(argv[2]),
|
||||
|
||||
Reference in New Issue
Block a user