Fix pixel format conversion code. Fixes issue 87.
This commit is contained in:
parent
6d9e6881d3
commit
963d2969b8
@ -9,6 +9,7 @@ NVIDIA Texture Tools version 2.0.6
|
|||||||
* Do not use CUDA to compress small mipmaps. Fixes issue 76.
|
* Do not use CUDA to compress small mipmaps. Fixes issue 76.
|
||||||
* Compute mipmaps of semi-transparent images correctly.
|
* Compute mipmaps of semi-transparent images correctly.
|
||||||
* Shutdown CUDA properly. Fixes issue 83.
|
* Shutdown CUDA properly. Fixes issue 83.
|
||||||
|
* Fix pixel format converions. Fixes issue 87.
|
||||||
|
|
||||||
NVIDIA Texture Tools version 2.0.5
|
NVIDIA Texture Tools version 2.0.5
|
||||||
* Fix error in single color compressor. Fixes issue 66.
|
* Fix error in single color compressor. Fixes issue 66.
|
||||||
|
@ -989,10 +989,10 @@ void DirectDrawSurface::readLinearImage(Image * img)
|
|||||||
stream->serialize(&c, byteCount);
|
stream->serialize(&c, byteCount);
|
||||||
|
|
||||||
Color32 pixel(0, 0, 0, 0xFF);
|
Color32 pixel(0, 0, 0, 0xFF);
|
||||||
pixel.r = PixelFormat::convert(c >> rshift, rsize, 8);
|
pixel.r = PixelFormat::convert((c & header.pf.rmask) >> rshift, rsize, 8);
|
||||||
pixel.g = PixelFormat::convert(c >> gshift, gsize, 8);
|
pixel.g = PixelFormat::convert((c & header.pf.gmask) >> gshift, gsize, 8);
|
||||||
pixel.b = PixelFormat::convert(c >> bshift, bsize, 8);
|
pixel.b = PixelFormat::convert((c & header.pf.bmask) >> bshift, bsize, 8);
|
||||||
pixel.a = PixelFormat::convert(c >> ashift, asize, 8);
|
pixel.a = PixelFormat::convert((c & header.pf.amask) >> ashift, asize, 8);
|
||||||
|
|
||||||
img->pixel(x, y) = pixel;
|
img->pixel(x, y) = pixel;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user