소스 검색

* Prefix dithering functions with _dither_ to avoid namespace cluttering.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2666 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 년 전
부모
커밋
41efcdecc0
6개의 변경된 파일19개의 추가작업 그리고 13개의 파일을 삭제
  1. +12
    -6
      examples/dither.c
  2. +1
    -1
      examples/edd.c
  3. +1
    -1
      pipi/dither/dbs.c
  4. +1
    -1
      pipi/dither/floydsteinberg.c
  5. +1
    -1
      pipi/dither/ostromoukhov.c
  6. +3
    -3
      pipi/pipi.h

+ 12
- 6
examples/dither.c 파일 보기

@@ -33,18 +33,24 @@ int main(int argc, char *argv[])
switch(atoi(argv[2]))
{
case 6:
newimg = pipi_dbs(img); break;
newimg = pipi_dither_dbs(img);
break;
case 5:
newimg = pipi_ostromoukhov(img, PIPI_SCAN_SERPENTINE); break;
newimg = pipi_dither_ostromoukhov(img, PIPI_SCAN_SERPENTINE);
break;
case 4:
newimg = pipi_ostromoukhov(img, PIPI_SCAN_RASTER); break;
newimg = pipi_dither_ostromoukhov(img, PIPI_SCAN_RASTER);
break;
case 3:
newimg = pipi_floydsteinberg(img, PIPI_SCAN_SERPENTINE); break;
newimg = pipi_dither_floydsteinberg(img, PIPI_SCAN_SERPENTINE);
break;
case 2:
newimg = pipi_floydsteinberg(img, PIPI_SCAN_RASTER); break;
newimg = pipi_dither_floydsteinberg(img, PIPI_SCAN_RASTER);
break;
case 1:
default:
newimg = pipi_dither_ordered(img); break;
newimg = pipi_dither_ordered(img);
break;
}

pipi_free(img);


+ 1
- 1
examples/edd.c 파일 보기

@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
img = pipi_load(argv[1]);
pipi_getpixels(img, PIPI_PIXELS_Y_F);
gauss = pipi_gaussian_blur(img, sigma);
dither = pipi_floydsteinberg(img, PIPI_SCAN_RASTER);
dither = pipi_dither_floydsteinberg(img, PIPI_SCAN_RASTER);
pipi_free(img);

/* Compute the standard error */


+ 1
- 1
pipi/dither/dbs.c 파일 보기

@@ -35,7 +35,7 @@
/* FIXME: though the algorithm is supposed to stop, we do not have a real,
* guaranteed stop condition here. */

pipi_image_t *pipi_dbs(pipi_image_t *src)
pipi_image_t *pipi_dither_dbs(pipi_image_t *src)
{
double kernel[NN * NN];
double t = 0.;


+ 1
- 1
pipi/dither/floydsteinberg.c 파일 보기

@@ -22,7 +22,7 @@
#include "pipi.h"
#include "pipi_internals.h"

pipi_image_t *pipi_floydsteinberg(pipi_image_t *src, pipi_scan_t scan)
pipi_image_t *pipi_dither_floydsteinberg(pipi_image_t *src, pipi_scan_t scan)
{
pipi_image_t *dst;
pipi_pixels_t *srcp, *dstp;


+ 1
- 1
pipi/dither/ostromoukhov.c 파일 보기

@@ -66,7 +66,7 @@ static int const table[][3] =
{385, 112, 103}, {65, 18, 17}, {395, 104, 101}, {4, 1, 1}
};

pipi_image_t *pipi_ostromoukhov(pipi_image_t *src, pipi_scan_t scan)
pipi_image_t *pipi_dither_ostromoukhov(pipi_image_t *src, pipi_scan_t scan)
{
pipi_image_t *dst;
pipi_pixels_t *srcp, *dstp;


+ 3
- 3
pipi/pipi.h 파일 보기

@@ -78,10 +78,10 @@ extern pipi_image_t *pipi_gaussian_blur(pipi_image_t *, float);
extern pipi_image_t *pipi_gaussian_blur_ext(pipi_image_t *,
float, float, float, float);

extern pipi_image_t *pipi_floydsteinberg(pipi_image_t *, pipi_scan_t);
extern pipi_image_t *pipi_dither_floydsteinberg(pipi_image_t *, pipi_scan_t);
extern pipi_image_t *pipi_dither_ordered(pipi_image_t *);
extern pipi_image_t *pipi_ostromoukhov(pipi_image_t *, pipi_scan_t);
extern pipi_image_t *pipi_dbs(pipi_image_t *);
extern pipi_image_t *pipi_dither_ostromoukhov(pipi_image_t *, pipi_scan_t);
extern pipi_image_t *pipi_dither_dbs(pipi_image_t *);
extern void pipi_dither_24to16(pipi_image_t *);

extern void pipi_test(pipi_image_t *);


불러오는 중...
취소
저장