Now can handle indexing correctly. Patch from Arjan to do so.

1999-11-10  Jonathan Blandford  <jrb@redhat.com>

	* src/io-ras.c (OneLineMapped_file): Now can handle indexing
	correctly.  Patch from Arjan to do so.
This commit is contained in:
Jonathan Blandford 1999-11-10 18:47:39 +00:00 committed by Jonathan Blandford
parent d2bfbdb99e
commit d23b21018c
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,8 @@
1999-11-10 Jonathan Blandford <jrb@redhat.com>
* src/io-ras.c (OneLineMapped_file): Now can handle indexing
correctly. Patch from Arjan to do so.
1999-11-10 Michael Fulbright <drmike@redhat.com>
* src/io-pnm.c (pnm_ascii_read_scanline): Fixed loading of ASCII PNM

View File

@ -27,7 +27,9 @@
Known bugs:
* "Indexed" (incl grayscale) sunras files don't work
* 1 bpp sunrasfiles don't work
( 1999/11/10 - Fixed for non-progressive loading )
* 1 bpp sunrasfiles don't work yet
* Compressed rasterfiles don't work yet
*/
@ -146,9 +148,9 @@ static void OneLineMapped_file(FILE * f, guint Width, guchar * pixels,
(void) fread(&DummyByte, 1, 1, f);
X = 0;
while (X < Width) {
pixels[X * 3] = Map[buffer[X]*3];
pixels[X * 3+1] = Map[buffer[X]*3];
pixels[X * 3+2] = Map[buffer[X]*3];
pixels[X * 3] = Map[buffer[X]];
pixels[X * 3+1] = Map[buffer[X]+256];
pixels[X * 3+2] = Map[buffer[X]+512];
X++;
}