Changeset 3546 for libpipi


Ignore:
Timestamp:
Jul 9, 2009, 1:38:39 AM (11 years ago)
Author:
Sam Hocevar
Message:

Implement pipi_rotate(). Currently nearest-neighbour only, supersample if
you need more precision.

Location:
libpipi/trunk/pipi
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/pipi/Makefile.am

    r3411 r3546  
    7171        filter/convolution.c \
    7272        filter/color.c \
     73        filter/rotate.c \
    7374        filter/transform.c \
    7475        filter/median.c \
  • libpipi/trunk/pipi/context.c

    r3418 r3546  
    7272        { "rotate180", 0 },
    7373        { "rotate270", 0 },
     74        { "rotate", 1 },
    7475        { "invert", 0 },
    7576        { "threshold", 1 },
     
    351352    }
    352353    else if(!strcmp(cmd, "brightness") || !strcmp(cmd, "contrast")
    353              || !strcmp(cmd, "threshold"))
     354             || !strcmp(cmd, "threshold") || !strcmp(cmd, "rotate"))
    354355    {
    355356        pipi_image_t *src, *dst = NULL;
     
    369370            case 'b': dst = pipi_brightness(src, val); break;
    370371            case 'c': dst = pipi_contrast(src, val); break;
     372            case 'r': dst = pipi_rotate(src, val); break;
    371373            case 't': dst = pipi_threshold(src, val); break;
    372374        }
  • libpipi/trunk/pipi/pipi.h

    r3418 r3546  
    193193__extern pipi_image_t *pipi_hflip(pipi_image_t *);
    194194__extern pipi_image_t *pipi_vflip(pipi_image_t *);
     195__extern pipi_image_t *pipi_rotate(pipi_image_t *, double);
    195196__extern pipi_image_t *pipi_rotate90(pipi_image_t *);
    196197__extern pipi_image_t *pipi_rotate180(pipi_image_t *);
Note: See TracChangeset for help on using the changeset viewer.