@joyfulljs/rotate-image

    1.0.1 • Public • Published

    rotate-image

    rotate image each time by 90 degree.

    installation

    npm install @joyfulljs/rotate-image

    usage

    import imageRotate from '@joyfulljs/rotate-image';
    
    // { ... omitted .... }
    
    <img ref={imgRef} src="...." />;
    
    var dataUrl = roteteImage(imgRef.current);
    imgRef.current.src = dataUrl;

    api

    roateImage(img: HTMLImageElement, options: { quality?: number, mineType?: string }): string

    • options.quality default to 1
    • options.mineType default to image/jpeg

    most of times you do not need to provide options, in case you need to save rotated image back to server;

    license

    MIT

    Keywords

    Install

    npm i @joyfulljs/rotate-image

    DownloadsWeekly Downloads

    157

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    50.1 kB

    Total Files

    13

    Last publish

    Collaborators

    • elvinzhu