Browse Source

* Goddammit, this time I'm fixing the f32 to u8 RGB conversion for real.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2775 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 years ago
parent
commit
541e0213f7
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      pipi/pixels.c

+ 2
- 2
pipi/pixels.c View File

@@ -156,7 +156,7 @@ pipi_pixels_t *pipi_getpixels(pipi_image_t *img, pipi_format_t type)

dest[4 * (y * img->w + x) + i] = d;

e = (p - u8tof32(d)) / 8;
e = (p - u8tof32(d)) / 16;
if(x < img->w - 1)
src[4 * (y * img->w + x + 1) + i] += e * 7;
if(y < img->h - 1)
@@ -192,7 +192,7 @@ pipi_pixels_t *pipi_getpixels(pipi_image_t *img, pipi_format_t type)

dest[3 * (y * img->w + x) + i] = d;

e = (p - u8tof32(d)) / 8;
e = (p - u8tof32(d)) / 16;
if(x < img->w - 1)
src[4 * (y * img->w + x + 1) + i] += e * 7;
if(y < img->h - 1)


Loading…
Cancel
Save