Top 10 Js Image Processing Libraries

Top 10 Js Image Processing Libraries

introduce

For many people, using JavaScript to process images is not a very simple thing. Fortunately, we can use third-party libraries to achieve the functions we want. This article will introduce which JavaScript image processing libraries are available for us to choose and use! The following rankings are in no particular order

1. Pica

This plugin reduces the upload size of large images, saving you time on uploads. It can resize images in the browser without pixelation and is fairly fast. It will automatically choose the best available technologies from web-workers, web assembly, createImageBitmap and pure js.

  • Reduce the upload size of large images and save upload time;
  • Save server resources on image processing;
  • Generate thumbnails in the browser;

https://github.com/nodeca/pica

2. Lena.js

This is an image processing library containing 22 filters

https://github.com/davidsonfellipe/lena.js

3. Compressor.js

This is a simple JS image compressor that uses the browser's native canvas.toBlob API to handle image compression. The compression output quality can be set from 0 to 1.

https://github.com/fengyuanchen/compressorjs

4. Fabric.js

Fabric.js allows to easily create simple shapes such as rectangles, circles, triangles and other polygons, or more complex shapes composed of many paths on an html <canvas> element on a web page using JavaScript. Fabric.js will then allow the size, position, and rotation of these objects to be manipulated using the mouse. It is also possible to change some properties of these objects such as color, transparency, depth position on the web page, or select groups of these objects using the Fabric.js library. Fabric.js also allows SVG images to be converted into JavaScript data which can be used to put it into a <canvas> element.

https://github.com/fabricjs/fabric.js

5. Blurify

Used to blur images, with graceful degradation support from CSS mode to canvas mode. The plugin works in three modes:

  • CSS: Using the filter property
  • canvas: Use canvas to export base64
  • auto: css mode takes precedence, otherwise it automatically switches to canvas mode

Just pass the image, blur value and mode to the function to get a simple and effective blurred image.

https://github.com/JustClear/blurify

6. Merge Images

This library makes it easy to composite images together. Sometimes, working with canvas can be a bit tedious, especially if you only need a canvas context to do something relatively simple like merge a few images together. merge-images abstracts all repetitive tasks into a simple function call. Images can be overlapped with each other and repositioned. The function returns a Promise that resolves to a base64 data URI. Supports both browsers and Node.js.

https://github.com/lukechilds/merge-images

7. Cropper.js

This plugin is a simple JavaScript image cropper that crops, rotates, scales and zooms images in a visual environment. It also allows setting the aspect ratio.

https://github.com/fengyuanchen/cropperjs

8. CamanJS

It is a canvas manipulation library for Javascript. It combines an easy-to-use interface with advanced, efficient image/canvas editing technology. It's easily extendable with new filters and plugins, and it has a wide range of image editing capabilities that are constantly growing. It is completely independent of the library and can be used in both NodeJS and the browser. You can choose from a set of preset filters or manually change properties such as brightness, contrast, saturation to get the desired output.

https://github.com/meltingice/CamanJS/

9. MarvinJ

MarvinJ is a pure JavaScript image processing framework derived from the Marvin Framework. MarvinJ is simple yet powerful for many different image processing applications. Marvin provides many algorithms to manipulate color and appearance. Marvin also has an automatic detection function. The ability to use basic image features such as edges, corners, and shapes is fundamental to image processing. The plugin helps detect and analyze the corners of objects, thereby determining the locations of the main objects in the scene. Because of this, objects can be automatically cropped out.

https://github.com/gabrielarchanjo/marvinj

10. Grade

This JS library produces a complementary gradient generated from the first 2 main colors in the provided image. This allows the site to fill the div with a matching gradient derived from the image. This is an easy to use plugin that helps keep your website looking great.

<div class="gradient-wrap"> 
    <img src="./samples/finding-dory.jpg" alt="" /> 
</div> 
<div class="gradient-wrap"> 
    <img src="./samples/good-dinosaur.jpg" alt="" /> 
</div> 
<script src="path/to/grade.js"></script> 
<script type="text/javascript"> 
 window.addEventListener('load', function(){ 
 Grade(document.querySelectorAll('.gradient-wrap')) 
 }) 
</script>

The above are the details of the top 10 Js image processing libraries. For more information about Js image processing libraries, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Detailed explanation of how to implement JavaScript image magnifying glass effect
  • How to use interpolation to implement image gradients in JavaScript
  • An example of how to blur an image using JavaScript
  • Javascript Basics_Simple Implementation of Embedded Images
  • Echo.js, a JavaScript image lazy loading library
  • How to implement image cycle light and dark changes using javascript
  • JS preview image displays local images on the browser
  • JavaScript image processing - deep understanding of affine transformation
  • Javascript image processing - image morphology (dilation and erosion)
  • Javascript image processing - adding common methods to matrices

<<:  Docker implements MariaDB sub-library and sub-table and read-write separation functions

>>:  NULL and Empty String in Mysql

Recommend

MySQL variable declaration and stored procedure analysis

Declaring variables Setting Global Variables set ...

CSS scroll bar style modification code

CSS scroll bar style modification code .scroll::-...

Web Design Tips: Simple Rules for Page Layout

Repetition: Repeat certain page design styles thr...

Some methods to optimize query speed when MySQL processes massive data

In the actual projects I participated in, I found...

...

Promise encapsulation wx.request method

The previous article introduced the implementatio...

MySQL table addition, deletion, modification and query basic tutorial

1. Create insert into [table name] (field1, field...

Vue implements drag and drop or click to upload pictures

This article shares the specific code of Vue to a...

Solution to the same IP after cloning Ubuntu 18 virtual machine

Preface I recently used a virtual machine to inst...

Introduction and use of five controllers in K8S

Table of contents Controller type of k8s Relation...

Binary installation of mysql 5.7.23 under CentOS7

The installation information on the Internet is u...

Implementation of fastdfs+nginx cluster construction

1. Introduction to fastdfs 1. What is fastdfs Fas...

A collection of possible problems when migrating sqlite3 to mysql

Brief description Suitable for readers: Mobile de...