added missing implementations for 1 and 3 bytes per pixel.

2007-06-20  Sven Neumann  <sven@gimp.org>

	* app/base/tile-pyramid.c (tile_pyramid_write_quarter): added missing
	implementations for 1 and 3 bytes per pixel.

svn path=/trunk/; revision=22808
This commit is contained in:
Sven Neumann 2007-06-20 16:25:53 +00:00 committed by Sven Neumann
parent 3038dc0e80
commit 3f747cf0e3
2 changed files with 30 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2007-06-20 Sven Neumann <sven@gimp.org>
* app/base/tile-pyramid.c (tile_pyramid_write_quarter): added missing
implementations for 1 and 3 bytes per pixel.
2007-06-20 Sven Neumann <sven@gimp.org>
* app/base/Makefile.am
@ -5,7 +10,7 @@
* app/base/tile-pyramid.[ch]: image pyramid code split out of
GimpProjection.
* app/core/gimpprojection.[ch]: use TilePyramid.
* app/core/gimpprojection.[ch]: use the new TilePyramid.
2007-06-20 Sven Neumann <sven@gimp.org>

View File

@ -328,7 +328,17 @@ tile_pyramid_write_quarter (Tile *dest,
switch (bpp)
{
case 1:
g_warning ("not yet implemented");
for (x = 0; x < src_ewidth / 2; x++)
{
dst[0] = (src0[0] + src1[0] + src2[0] + src3[0]) / 4;
dst += 1;
src0 += 2;
src1 += 2;
src2 += 2;
src3 += 2;
}
break;
case 2:
@ -359,7 +369,19 @@ tile_pyramid_write_quarter (Tile *dest,
break;
case 3:
g_warning ("not yet implemented");
for (x = 0; x < src_ewidth / 2; x++)
{
dst[0] = (src0[0] + src1[0] + src2[0] + src3[0]) / 4;
dst[1] = (src0[1] + src1[1] + src2[1] + src3[1]) / 4;
dst[2] = (src0[2] + src1[2] + src2[2] + src3[2]) / 4;
dst += 3;
src0 += 6;
src1 += 6;
src2 += 6;
src3 += 6;
}
break;
case 4: