Resize image in browser with high quality and high speed

Overview

pica - high quality image resize in browser

Build Status NPM version

Resize images in browser without pixelation and reasonably fast. Autoselect the best of available technologies: webworkers, webassembly, createImageBitmap, pure JS.

demo

With pica you can:

  • Reduce upload size for large images, saving upload time.
  • Saves server resources on image processing.
  • Generate thumbnails in browser.
  • ...

Note. If you need File/Blob resize (from form's file input), consider use image-blob-reduce. It has additional machinery to process orientation, keep EXIF metadata and so on.

Prior to use

Here is a short list of problems you can face:

  • Loading image:
    • Due to JS security restrictions, you can process images from the same domain or local files only. If you load images from remote domain use proper Access-Control-Allow-Origin header.
    • iOS has a memory limits for canvas elements, that may cause problems in some cases, more details.
    • If your source data is jpeg image, it can be rotated. Consider use image-blob-reduce.
  • Saving image:
    • Some ancient browsers do not support canvas.toBlob() method. Use pica.toBlob(), it includes required shim.
    • For jpeg source, it's a good idea to keep exif data. Consider use image-blob-reduce.
  • Quality
    • JS canvas does not support access to info about gamma correction. Bitmaps have 8 bits per channel. That causes some quality loss, because with gamma correction precision could be 12 bits per channel.
    • Precision loss will not be noticeable for ordinary images like kittens, selfies and so on. But we don't recommend this library for resizing professional quality images.

Install

npm install pica

Use

const pica = require('pica')();

// Resize from Canvas/Image to another Canvas
pica.resize(from, to, {
  unsharpAmount: 80,
  unsharpRadius: 0.6,
  unsharpThreshold: 2
})
.then(result => console.log('resize done!'));

// Resize & convert to blob
pica.resize(from, to)
  .then(result => pica.toBlob(result, 'image/jpeg', 0.90))
  .then(blob => console.log('resized to canvas & created blob!'));

API

new Pica(config)

Create resizer instance with given config (optional):

  • tile - tile width/height. Images are processed by regions, to restrict peak memory use. Default 1024.
  • features - list of features to use. Default is [ 'js', 'wasm', 'ww' ]. Can be [ 'js', 'wasm', 'cib', 'ww' ] or [ 'all' ].
  • idle - cache timeout, ms. Webworkers create is not fast. This option allow reuse webworkers effectively. Default 2000.
  • concurrency - max webworkers pool size. Default is autodetected CPU count, but not more than 4.
  • createCanvas - function which returns a new canvas, used internally by pica. Default returns a <canvas> element, but this function could return an OffscreenCanvas instead (to run pica in a Service Worker). Function signature: createCanvas(width: number, height: number): Canvas

Important! Latest browsers may support resize via createImageBitmap. This feature is supported (cib) but disabled by default and not recommended for use. So:

  • createImageBitmap() is used for non-blocking image decode (when available, without downscale).
  • It's resize feature is blocked by default pica config. Enable it only on your own risk. Result with enabled cib will depend on your browser. Result without cib will be predictable and good.

.resize(from, to, options) -> Promise

Resize image from one canvas (or image) to another. Sizes are taken from source and destination objects.

  • from - source, can be Canvas, Image or ImageBitmap.
  • to - destination canvas, its size is supposed to be non-zero.
  • options - quality (number) or object:
    • quality - 0..3. Default = 3 (lanczos, win=3).
    • alpha - use alpha channel. Default = false.
    • unsharpAmount - >=0, in percents. Default = 0 (off). Usually between 50 to 100 is good.
    • unsharpRadius - 0.5..2.0. By default it's not set. Radius of Gaussian blur. If it is less than 0.5, Unsharp Mask is off. Big values are clamped to 2.0.
    • unsharpThreshold - 0..255. Default = 0. Threshold for applying unsharp mask.
    • cancelToken - Promise instance. If defined, current operation will be terminated on rejection.

Result is Promise, resolved with to on success.

(!) If you need to process multiple images, do it sequentially to optimize CPU & memory use. Pica already knows how to use multiple cores (if browser allows).

.toBlob(canvas, mimeType [, quality]) -> Promise

Convenience method, similar to canvas.toBlob(), but with promise interface & polyfill for old browsers.

.resizeBuffer(options) -> Promise

Supplementary method, not recommended for direct use. Resize Uint8Array with raw RGBA bitmap (don't confuse with jpeg / png / ... binaries). It does not use tiles & webworkers. Left for special cases when you really need to process raw binary data (for example, if you decode jpeg files "manually").

  • options:
    • src - Uint8Array with source data.
    • width - src image width.
    • height - src image height.
    • toWidth - output width, >=0, in pixels.
    • toHeight - output height, >=0, in pixels.
    • quality - 0..3. Default = 3 (lanczos, win=3).
    • alpha - use alpha channel. Default = false.
    • unsharpAmount - >=0, in percents. Default = 0 (off). Usually between 50 to 100 is good.
    • unsharpRadius - 0.5..2.0. Radius of Gaussian blur. If it is less than 0.5, Unsharp Mask is off. Big values are clamped to 2.0.
    • unsharpThreshold - 0..255. Default = 0. Threshold for applying unsharp mask.
    • dest - Optional. Output buffer to write data, if you don't wish pica to create new one.

Result is Promise, resolved with resized rgba buffer.

What is "quality"

Pica has presets to adjust speed/quality ratio. Simply use quality option param:

  • 0 - Box filter, window 0.5px
  • 1 - Hamming filter, window 1.0px
  • 2 - Lanczos filter, window 2.0px
  • 3 - Lanczos filter, window 3.0px

In real world you will never need to change default (max) quality. All this variations were implemented to better understand resize math :)

Unsharp mask

After scale down image can look a bit blured. It's good idea to sharpen it a bit. Pica has built-in "unsharp mask" filter (off by default). Set unsharpAmount to positive number to activate the filter.

Filter's parameters are similar to ones from Photoshop. We recommend to start with unsharpAmount = 80, unsharpRadius = 0.6 and unsharpThreshold = 2. There is a correspondence between UnsharpMask parameters in popular graphics software.

Browser support

We didn't have time to test all possible combinations, but in general:

Note. Though you can run this package on node.js, browsers are the main target platform. On server side we recommend to use sharp.

References

You can find these links useful:

pica for enterprise

Available as part of the Tidelift Subscription.

The maintainers of pica and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. Learn more.

Comments
  • Add rotation support

    Add rotation support

    It would be good to be able to specify a rotation angle (in multiples of 90 degrees) to be applied to the image before resizing.

    We have a use case where on upload we need to read exif orientation data, rotate the image correctly, resize, and then send to the server.

    Currently we have to do this by reading the image into a canvas on the main UI thread which negates the point of using pica and webworkers. By only supporting 4 angles for rotation it shouldn't be too hard to read the pixel data out in a different order and skip using CanvasRenderingContext2D.rotate().

    opened by jamesmoss 30
  • Resizing from <img> element results in broken output in Chrome 81

    Resizing from element results in broken output in Chrome 81

    Hi. First of all - many thanks for that library! We've been using it quite a lot but recently faced several images that result in broken output when using Chrome and <img> element as source. If used in Firefox - everything's fine. If used in Chrome with <canvas> element as source (without any transformation, just drawing image) - everything's fine. Options and features don't affect this.

    Original image (one of) - https://dl.dropboxusercontent.com/1/view/zjnu3kgtyzq6zv3/pica/original.jpg Corrupted result (<img> source) - https://dl.dropboxusercontent.com/1/view/c6s817ypu7uibgi/pica/from%20image.png Correct result (<canvas> source) - https://dl.dropboxusercontent.com/1/view/kh4cisii050o4gn/pica/from%20canvas.png Playground for testing - https://codepen.io/msidorov/full/PoPdVjV

    All these were taken from Chrome 81, different OSes

    Many thanks in advance.

    opened by FarSeeing 28
  • Pica causing a crash in Chrome 64 / Safari 11

    Pica causing a crash in Chrome 64 / Safari 11

    https://jsfiddle.net/uyczfLdk/21/

    • open jsfiddle in chrome 64
    • click resize button
    • wait 2 - 10 seconds
    • observe browser tab crash

    The above JS fiddle is taking an 800px wide image and resizing it down to 4 pixels.

    This seems to cause Chrome 64 on mac os 10.12.6 (Sierra) to crash with a warning in the Sources tab that there is an out of memory problem. Safari 11 seems to just spin a beach ball. Firefox 58 seems to work fine.

    I think it is some what related to the multiple of the resize. I've seen making something 100x smaller work but not when it reaches 150+ smaller.

    bug 
    opened by stefanhayden 28
  • USM color shift?

    USM color shift?

    Hi, I've been doing some comparisons of pica's USM output to Photoshop and ImageMagick. Photoshop and ImageMagick seem to produce similar results to each other (with comparable USM parameters) but pica is not really comparable to either. It seems to me that pica sharpens significantly more, and there seems to be some color shift.

    The color shift is the bigger issue for me, and it's very different from Photoshop and ImageMagick which seem more natural. At first I wasn't sure if the color shift was a byproduct of canvas conversion and/or resizing, so I resized with pica using no sharpening (only canvas resize) and the results are comparable to Photoshop / ImageMagick, so I'm pretty sure the color shift is coming from pica's USM recipe (and it seems to add a bluish tint, although it may depend on image).

    I tried looking at the code to see what pica is doing and of course it is well beyond my area of expertise, ha. I did a search on SO and found this thread where Vitaly refers to color shift, so maybe this is to be expected?

    https://stackoverflow.com/questions/13296645/opencv-and-unsharp-masking-like-adobe-photoshop/23322820#23322820

    Is this just "how it is" with pica? Has anyone developed alternative USM recipes for pica that come closer to Photoshop / ImageMagick?

    Here is my test image (not my image, but it seemed to be a good one to test various things like chroma sampling, USM, etc.)

    https://live.staticflickr.com/65535/51137845528_83bd94d4bf_o.jpg

    If you run it thru photoshop USM you can see color of the water stays somewhat neutral and golden, but pica USM tends to replace the golden highlights in the water with more blue.

    opened by tomdav999 26
  • Out of memory at ImageData creation

    Out of memory at ImageData creation

    I'm heavily using Pica to resize images in an application, but after doing too many in sequence I get the following JavaScript error:

    RangeError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': Out of memory at ImageData creation

    I've got it locked down to single-threaded operation so invocations of Pica are sequential instead of parallel, but I'm not sure what else I can do apart from not use Pica.

    need triage 
    opened by darkfrog26 26
  • Magic Kernel support

    Magic Kernel support

    Right now you’re using a standard kernel + blur filter. Would be cool to use the magic kernel in order to get better image quality. See this post for the explanation of how that work: http://www.johncostella.com/magic/

    Thanks for all the great work in your lib <3

    enhancement 
    opened by vjeux 24
  • Grey borders on transparent images after resize.

    Grey borders on transparent images after resize.

    Hi, Can we avoid the grey outlines that appear on the edges of the image content when re-sizing transparent images?

    Source: http://i.share.pho.to/5c98cbcc_o.png

    Result: http://i.share.pho.to/55d46162_o.png

    Settings used for the above example http://i.share.pho.to/7bac2d68_o.jpeg

    Since this happen when alphas are used, an option to change the black color that is filled when alphas are not used would be nice!

    bug 
    opened by prototype23 23
  • Color changes after resizing.

    Color changes after resizing.

    So I'm using this resize to upload images to my server, but after resizing, the colors change a bit, or maybe the brightness. For example, a full white image, after resizing, the white turns a bit dark (#fdfdfd). I really need that the output image is equal to the source image, but size.

    Thanks anyway, this proect is old! But still useful, good work!

    opened by dene- 20
  • Uncaught ReferenceError: n is not defined

    Uncaught ReferenceError: n is not defined

    I'm using image-blob-reduce in a next.js app. In dev mode it works fine, but in prod mode, I get this error:

    Uncaught ReferenceError: n is not defined
    

    Screenshot 2022-01-17 at 16 30 43

    It happens in the pica source:

    Screenshot 2022-01-17 at 17 05 08

    I already tried turning off Terser, did not change anything.

    Do you have any ideas what I could change to get this to work?

    opened by fabb 19
  • Use createImageBitmap if available

    Use createImageBitmap if available

    https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmapFactories/createImageBitmap

    I was hoping pica would solve my performance issues, but it does not. Resizing in a web worker is great, but the problem is decoding the image data on the UI thread. My test image is 7200x4800 and 4.5 MB (https://hd.unsplash.com/photo-1414396938948-81a7045e336f).

    The UI is blocked for about 700ms due to "Image Decode" triggered by getImageData.

    screenshot from 2016-10-19 12 23 16

    Do you think we can use a File/Blob object, pass it to the web worker and decode the image there?

    Note: you can not see this on the demo page, because you are rendering the images and the timeline doesn't show "Image Decode" separately but as part of "Composite Layers". If you hide the elements in the demo (display: none) you can see it. For the demo it's unavoidable to have image decoding on the UI thread, as you display the original image. But in the real world you might use pica to resize the image and then upload it, while never displaying the original to the user.

    screenshot from 2016-10-19 12 27 04 screenshot from 2016-10-19 12 27 30

    opened by Prinzhorn 19
  • Images (randomly?) corrupted with Firefox 58+

    Images (randomly?) corrupted with Firefox 58+

    Hi,

    I have been trying to debug this for some time and I would like to get your insight on this.

    On my app, users can upload a lot of pictures, and I am using pica to resize them before uploading. On Firefox (saw this happening for users on mac, linux and windows) some images, not always the same when I try multiple times, are not correct once on the server. As I am calculating the checksum before upload, it is not caused by a network error.

    Here is an example:

    • Original image: https://www.dropbox.com/s/go5tra5czulbfsm/IMGL7717.jpg?dl=0
    • Image after processing: https://www.dropbox.com/s/37n7ba5qhcl8vfq/314luvAL9s5OcI0ugieEKK-3cf7b61d9e.jpg?dl=0

    I am using a code inspired by https://github.com/nodeca/nodeca.users/blob/master/client/users/uploader/uploader.js to extract the EXIF data, resize the image using pica, and then put it back together. For each file:

    • Read it using readAsArrayBuffer
    • call filterJPEG
    • create a new Image
    • set the src using window.URL.createObjectURL(file)
    • create 2 canvas elements, set their size
    • draw the image on the first one
    • call pica to resize on the second canvas (one shared pica instance, using const pica = Pica({ idle: 10000 }))
    • get a blob from the dst canvas
    • put back together the JPEG header (from filterJPEG) and the body from the blob

    Once this is done, I use a webworker to calculate the MD5 checksum of the previously created blob, and upload it to my server (where the MD5 checksum is checked again).

    Do you have an idea of what can cause this? There are a lot of moving parts and I am only seeing the issue on Firefox. I would estimate than less than 0.5% of the files are corrupted like this, and retrying a corrupted file usually works fine. I havent seen this problem on Safari / Chrome.

    I know this may not be related to Pica, but I spent quite a lot of time trying to understand where it may come from, and I am not sure of how to pin it down.

    Thanks!

    UPD: probably a browser bug https://github.com/nodeca/pica/issues/130#issuecomment-371617724

    opened by renchap 18
  • Occasional NS_ERROR_FAILURE in Firefox in Pica 9.0.1

    Occasional NS_ERROR_FAILURE in Firefox in Pica 9.0.1

    This could be a bug in Firefox (version 108.0.1) but I'm getting this error sometimes while processing a sequence of image resizes:

    Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "webpack-internal:///./node_modules/pica/dist/pica.js", lineNumber: 2203, columnNumber: 0, data: null, stack: "[\"/index.js\"]</Pica.prototype.__landTileData@webpack-internal:///./node_modules/pica/dist/pica.js:2203:20\nprocessTile/</<@webpack-internal:///./node_modules/pica/dist/pica.js:2248:23\npromise callback*processTile/<@webpack-internal:///./node_modules/pica/dist/pica.js:2245:10\nlimit/</<@webpack-internal:///./node_modules/pica/dist/pica.js:1103:9\nroll@webpack-internal:///./node_modules/pica/dist/pica.js:1096:20\nlimit/<@webpack-internal:///./node_modules/pica/dist/pica.js:1113:7\nlimit@webpack-internal:///./node_modules/pica/dist/pica.js:1101:12\nprocessTile@webpack-internal:///./node_modules/pica/dist/pica.js:2220:19\n[\"/index.js\"]</Pica.prototype.__tileAndResize/</jobs<@webpack-internal:///./node_modules/pica/dist/pica.js:2302:14\n[\"/index.js\"]</Pica.prototype.__tileAndResize/<@webpack-internal:///./node_modules/pica/dist/pica.js:2301:24\npromise callback*[\"/index.js\"]</Pica.prototype.__tileAndResize@webpack-internal:///./node_modules/pica/dist/pica.js:2284:6\n[\"/index.js\"]</Pica.prototype.__processStages@webpack-internal:///./node_modules/pica/dist/pica.js:2358:15\n[\"/index.js\"]</Pica.prototype.resize/<@webpack-internal:///./node_modules/pica/dist/pica.js:2489:19\npromise callback*[\"/index.js\"]</Pica.prototype.resize@webpack-internal:///./node_modules/pica/dist/pica.js:2468:22\n_callee5$@webpack-internal:///./src/util.js:975:52\ntryCatch@webpack-internal:///./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js:119:17\nwrap/generator._invoke</<@webpack-internal:///./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js:99:32\ndefineIteratorMethods/
    

    There's no proper message attached to the exception, just a stacktrace.

    The code doing the resizing is pretty simple:

      let canv = document.createElement("canvas");
      canv.width = width;
      canv.height = height;
      let newCanv = pica.resize(img, canv);
      return pica.toBlob(newCanv, "image/jpeg", 0.9);
    
    opened by DanielStout5 0
  • Add new callback when Tile was resized

    Add new callback when Tile was resized

    Thanks for sharing this great library, it really helps us and our multiple 100k customers in the world out there! :)

    I would like to propose a small improvement as you can see in my PR. It would give a great benefit, if the users of the library could do some action, if a single Tile was resized.

    • Then it is possible to react on it, e.g. show the resized Tile in some fancy looking UI
    • It would then be also possible to validate the resized Tile for some criterias

    You may be wondering what the concrete use-case for us is?

    • On low memory devices(phones, old devices, ...) there is the problem, that sometimes downescaled images are just black, and there is no error being thrown (this for example also happens [very unlikely and rarely] when loading original images, so it is a very underlying problem.
    • The callback would help us, with validating if the resized Tile is fine, as we then can check if the Tile is black or not, and we can properly react on that case
    opened by phellmayr1 1
  • Calling getImageData in Safari raises InvalidStateError

    Calling getImageData in Safari raises InvalidStateError

    When doing resizes with Pica, we sometimes get an error when pica calls getImageData.

    The error that Safari throws is:

    InvalidStateError · The object is in an invalid state.

    It's called on this line:

    https://github.com/nodeca/pica/blob/6.1.1/index.js#L362

    So it's the canvas we're passing into pica. In other words, this could very well be an issue outside pica, since the canvas in question wasn't created by pica.

    In any case, I wanted to open this issue to see if others had the same problem, and to store some of my thoughts around this.

    Possible causes

    I've done some searching and found these two blog posts:

    https://pqina.nl/blog/canvas-area-exceeds-the-maximum-limit/ https://pqina.nl/blog/total-canvas-memory-use-exceeds-the-maximum-limit/

    According to them this could be caused by using using a too large canvas (max width/height is 4096 x 4096), however I know pica does tiling, so that shouldn't happen. Another possible cause mentioned in that blog post, is that Safari has trouble with releasing memory allocated to canvas after they're discarded.

    They offer a suggestion to remedy this:

    function releaseCanvas(canvas) {
        canvas.width = 1;
        canvas.height = 1;
        const ctx = canvas.getContext('2d');
        ctx && ctx.clearRect(0, 0, 1, 1);
    }
    

    Quoting from the blog post:

    We’re going to have to help out Safari to clean up its mess. Get rid of the things it can’t or won’t throw away.

    When we’re done with a element we have to manually “release” it.

    Meaning we resize the canvas to a very small size and clear its contents, this tricks Safari in to replacing the canvas in its storage with our compressed version.

    The [above] function will do just that.

    Safari will still hold on to the for a while, but at least now it won’t blow the roof of its storage depot.

    Possible fixes

    Applying the releaseCanvas method above may help. I checked the source and pica already sort of does this:

    https://github.com/nodeca/pica/blob/e4e661623a14160a824087c6a66059e3b6dba5a0/index.js#L526-L530

    Apparently I'm the one who suggested it 2 years ago (https://github.com/nodeca/pica/issues/199). Memory is short 😅

    But maybe also calling clearRect would help further.

    Basically enhance the existing fix to do what releaseCanvas above does. The author of that blog post has built an image editor based on canvas, so hopefully knows this area pretty well.

    Versions

    Pica Version: 6.1.1 Safari Version: 15.3.1, 15.4.0, 15.4.1 (we've seen this issue across ~250 users during the past few months)

    TODO

    • [ ] We're going to try passing in something other than a canvas, and see if that helps.
    opened by sandstrom 0
  • Picture misplaced

    Picture misplaced

    Your library is great, but I have some problems

    I don't know what I did wrong, and occasionally some pictures will be misplaced. I framed them with a red frame.

    The probability of error is about 5%, and our testers and developers cannot reproduce it. But users can always have this situation. It should be related to the type of phone, but I don't have definite evidence. I want to know why.

    反馈2 反馈3

    The following code is my compression method. Accept a File type and return the compressed File.

    const pica = require('pica')();
    
    const maxSize = 2097152 // 2M
    // const maxSize = 1000000
    const isLarge = (size) => {
        return size > 2097152 * 3 // 6M
    }
    /*
    * @params myFile: type is File
    * */
    export default (myFile) => {
        try {
            return new Promise((res, rej) => {
                let reader = new FileReader();
                reader.readAsDataURL(myFile);
                reader.onload = function (theFile) {
                    let image = new Image();
                    image.src = theFile.target.result;
                    image.onload = function () {
                        const offScreenCanvas = document.createElement('canvas')
                        const big = this.width > 2000 || this.height > 2000
                        const veryBig = this.width > 4000 || this.height > 4000
                        offScreenCanvas.width = veryBig ? this.width * 0.3 : (big ? this.width * 0.5 : this.width)
                        offScreenCanvas.height = veryBig ? this.height * 0.3 : (big ? this.height * 0.5 : this.height)
                        pica.resize(image, offScreenCanvas, {
                            quality: 1,
                        }).then(result => pica.toBlob(result, 'image/jpeg', isLarge(myFile.size) ? 0.4 : 0.6))
                            .then(blob => {
                                let files = new window.File([blob], myFile.name, {type: 'image/jpeg'})
                                if (files.size > maxSize) {
                                    rej('图片太大:' + files.size)
                                }
                                res(files) // return new File
                            });
                    };
                };
            })
        } catch (e) {
            if (myFile.size > maxSize) {
                return false
            }
            return myFile
        }
    }
    
    
    opened by wuweikd 9
Owner
Nodeca
rcopen.com sources and node.js libraries
Nodeca
Doblar - a fully local image converter that runs in your browser

Doblar is a fully local image converter that runs in your browser. Doblar is purely client side: nothing is uploaded to a server or anything like that. All conversions take place in your browser, which means your files never leave your computer.

Armaan A 28 Dec 17, 2022
Unite Gallery - Responsive jQuery Image and Video Gallery Plugin. Aim to be the best gallery on the web on it's kind. See demo here:

##Unite Gallery - Responsive jQuery Gallery Plugin Product Link: unitegallery.net This gallery has commercial versions for: WordPress , Joomla! , Pres

Max Valiano 531 Oct 24, 2022
A light wight javascript image viewing plugin with smooth animation and 0 dependence

A light wight javascript image viewing plugin with smooth animation and 0 dependence

null 50 Nov 12, 2022
ASP.NET Core image gallery with Marten, ImageSharp, and HTMX

Image Gallery This sample uses the following core technologies to deliver an image gallery experience: ASP.NET Core Marten ImageSharp.Web HTMX This al

Khalid Abuhakmeh 11 Feb 9, 2022
:woman: Library for image processing

Lena.js Tiny library for image processing. Install via NPM npm install lena.js --save Install via yarn yarn add lena.js Run demo yarn demo Demo htt

Davidson Fellipe 558 Dec 28, 2022
jQuery plugin that makes an image erasable (with mouse or touch movements)

jQuery.eraser v0.5.2 a jQuery plugin that makes an image erasable (with mouse or touch movements) This plugin replaces the targeted image by an intera

boblemarin 327 Oct 27, 2022
Nivo Slider - The Most Awesome jQuery Image Slider

Maintainer's Wanted! - Ineterested in contributing regularly to Nivo Slider development? Get in touch Nivo Slider The Nivo Slider is world renowned as

Verti Studio 1.2k Dec 24, 2022
🌅 Content-aware image resizer based on Seam Carving algorithm

Content-aware image resizing might be applied when it comes to changing the image proportions (i.e. reducing the width while keeping the height) and when losing some parts of the image is not desirable.

Oleksii Trekhleb 1.4k Dec 30, 2022
Get the first frame of a Gif image.

Get the first frame of a Gif image.

lijialiang 3 Apr 8, 2022
An image post-processing code library

WebGPU image filter Preview online 这是一个用来展示 webgpu 在图片处理方面应用的 demo,但由于 webgpu API 还不稳定,本地都需要经常修改 API 才能跟上金丝雀的脚步,所以本项目的效果目前也还不稳定,目前仅供学习交流。

kuake 4 Mar 8, 2022
A very barebones editor that supports clicking on any pixel in a JPEG image to see the 64 DCT coefficients that make up that 8x8 block

JPEG Sandbox This is a very barebones editor that supports clicking on any pixel in a JPEG image to see the 64 DCT coefficients that make up that 8x8

Omar Shehata 383 Jan 2, 2023
A simple image diff tool powered by avernakis.

Image Diff English | 简体中文 Introduction This is the tutorial project of Avernakis UI. Tiny, but production ready. Install Use npm as nam! (Node App Man

null 45 Dec 3, 2022
jQuery plugin for 'responsive cropping'. Dynamically crop images to fill available space without cutting out the image's subject. Great for full-screen images.

jQuery plugin for 'responsive cropping'. Dynamically crop images to fill available space without cutting out the image's subject. Great for full-screen images.

Jono Menz 3.2k Dec 30, 2022
2captcha-solver browser extension

About Supported captcha types: Normal (image with text) reCAPTCHA V2, V3 hCaptcha GeeTest KeyCaptcha ArkoseLabs (FunCaptcha) Supported browsers: Chrom

2captcha 24 Dec 21, 2022
Progressive pie, donut, bar and line charts

Peity Peity (sounds like deity) is a jQuery plugin that converts an element's content into a mini <svg> pie, donut, line or bar chart. Basic Usage HTM

Ben Pickles 4.2k Jan 1, 2023
Picdit - Photo Editor is a web application created using HTML, CSS, PHP and JavaScript

Picdit - Photo Editor is a web application created using HTML, CSS, PHP and JavaScript with the help VS Code and Microsoft Azure to develop the final project application outcome.

Darin Joshua D 3 Mar 31, 2022
Codecs lets you use read, write, edit, and analyze images.

Codecs Codecs lets you use read, write, edit, and analyze images. npm install @astropub/codecs Usage import * as fs from 'node:fs/promises' import * a

Astro Community 8 Oct 10, 2022
null 3.9k Dec 30, 2022
A type speed checking website which lets you check your typing speed and shows the real-tme leaderboards with mongodb as DB and express as backend

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Sreehari jayaraj 8 Mar 27, 2022
image/video/content slideshow engine providing high quality animation effects including Kenburns Effect and GLSL Transitions.

Diaporama Diaporama is an image/video/content slideshow engine providing high quality animation effects including Kenburns effect and GLSL Transitions

Gaëtan Renaudeau 797 Nov 26, 2022