Changeset 2665


Ignore:
Timestamp:
08/04/08 19:23:38 (5 years ago)
Author:
sam
Message:
  • ordered.c: implement Bayer dithering (pretty trivial).
Location:
libpipi/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/examples/dither.c

    r2656 r2665  
    3333    switch(atoi(argv[2])) 
    3434    { 
     35        case 6: 
     36            newimg = pipi_dbs(img); break; 
    3537        case 5: 
    36             newimg = pipi_dbs(img); break; 
     38            newimg = pipi_ostromoukhov(img, PIPI_SCAN_SERPENTINE); break; 
    3739        case 4: 
    38             newimg = pipi_ostromoukhov(img, PIPI_SCAN_SERPENTINE); break; 
     40            newimg = pipi_ostromoukhov(img, PIPI_SCAN_RASTER); break; 
    3941        case 3: 
    40             newimg = pipi_ostromoukhov(img, PIPI_SCAN_RASTER); break; 
     42            newimg = pipi_floydsteinberg(img, PIPI_SCAN_SERPENTINE); break; 
    4143        case 2: 
    42             newimg = pipi_floydsteinberg(img, PIPI_SCAN_SERPENTINE); break; 
     44            newimg = pipi_floydsteinberg(img, PIPI_SCAN_RASTER); break; 
    4345        case 1: 
    4446        default: 
    45             newimg = pipi_floydsteinberg(img, PIPI_SCAN_RASTER); break; 
     47            newimg = pipi_dither_ordered(img); break; 
    4648    } 
    4749 
  • libpipi/trunk/pipi/Makefile.am

    r2658 r2665  
    3232        filter/convolution.c \ 
    3333        dither/floydsteinberg.c \ 
     34        dither/ordered.c \ 
    3435        dither/ostromoukhov.c \ 
    3536        dither/dbs.c \ 
  • libpipi/trunk/pipi/pipi.h

    r2658 r2665  
    8080 
    8181extern pipi_image_t *pipi_floydsteinberg(pipi_image_t *, pipi_scan_t); 
     82extern pipi_image_t *pipi_dither_ordered(pipi_image_t *); 
    8283extern pipi_image_t *pipi_ostromoukhov(pipi_image_t *, pipi_scan_t); 
    8384extern pipi_image_t *pipi_dbs(pipi_image_t *); 
Note: See TracChangeset for help on using the changeset viewer.