pica
Resize image in browser with high quality and high speed (by nodeca)
probe-image-size
Get image size without full download. Supported image types: JPG, GIF, PNG, WebP, BMP, TIFF, SVG, PSD, ICO. (by nodeca)
Our great sponsors
pica | probe-image-size | |
---|---|---|
11 | 2 | |
3,612 | 957 | |
2.4% | 0.9% | |
0.0 | 0.0 | |
10 months ago | 10 months ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pica
Posts with mentions or reviews of pica.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-04-13.
-
Generate thumbhash at edge for tiny progressive images
Then pica to resize it and a simple function I wrote to crop it:
-
Can I specify the camera resolution when prompting the user to upload a selfie using JS?
Take a look at pica (Resize images in browser without pixelation and reasonably fast. Autoselect the best of available technologies: webworkers, webassembly, createImageBitmap, pure JS.)
-
Client side image processing? Package like 'Sharp' but for frontend webdev?
You can use the pica library for browser resizing - https://www.npmjs.com/package/pica - it's a really great tool. It can also reduce upload size for large images. And some library like this for merging images - https://www.npmjs.com/package/merge-images.
-
Cool & useful JavaScript libraries
Pica : resize image in browser with high quality and high speed.
- I made an online image resizer tool
-
How to include APIs in TamperMonkey?
I want to use this in my TamperMonkey script: https://github.com/nodeca/pica
-
Resizing and Compressing Photos Before Upload to Django
this sounds promising, though I've never used it before https://github.com/nodeca/pica
-
Test Ishan
Sample text here... Syntax highlighting js var foo = function (bar) { return bar++; }; console.log(foo(5)); ## Tables | Option | Description | | ------ | ----------- | | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. | Right aligned columns | Option | Description | | ------:| -----------:| | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. | ## Links link text link with title Autoconverted link https://github.com/nodeca/pica (enable linkify to see) ## Images Like links, Images also have a footnote style syntax ![Alt text][id] With a reference later in the document defining the URL location: [id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" ## Plugins The killer feature of markdown-it is very effective support of syntax plugins. ### Emojies > Classic markup: π :crush: π’ :tear: π π > > Shortcuts (emoticons): :-) :-( 8-) ;) see how to change output with twemoji. ### Subscript / Superscript - 19^th^ - H~2~O ### ++Inserted text++ ### ==Marked text== ### Footnotes Footnote 1 link[^first]. Footnote 2 link[^second]. Inline footnote^[Text of inline footnote] definition. Duplicated footnote reference[^second]. [^first]: Footnote can have markup and multiple paragraphs. [^second]: Footnote text. ### Definition lists Term 1 : Definition 1 with lazy continuation. Term 2 with inline markup : Definition 2 { some code, part of Definition 2 } Third paragraph of definition 2. Compact style: Term 1 ~ Definition 1 Term 2 ~ Definition 2a ~ Definition 2b ### Abbreviations This is HTML abbreviation example. It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on. [HTML]: Hyper Text Markup Language ### Custom containers ::: warning *here be dragons :::
-
Stop sending uncompressed images to servers for resizing (slow!)
this is a sort of similar one https://github.com/nodeca/pica (i found it hard to use with create-react-app tho had to skip over its use of webworkers, tho that would be cool to use, code to use pica here https://github.com/cmdcolin/aws\_serverless\_photo\_gallery/blob/master/frontend/src/App.tsx#L20-L25)
-
Building Your Own Blog with Nuxt Content and Tailwind
link with title
probe-image-size
Posts with mentions or reviews of probe-image-size.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-06-09.
-
Issues With Using 'http.get()' Which Resulted In 'BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.' Error
import React, { useState } from "react"; const url = require("url"); const http = require("http"); const sizeOf = require("image-size"); function Upload() { const [photoName, setPhotoName] = useState(""); const [photoLink, setPhotoLink] = useState(""); const [submittedData, setSubmittedData] = useState([]); const [errors, setErrors] = useState([]); function handlePhotoNameChange(event) { console.log("handlePhotoNameChange"); setPhotoName(event.target.value); } function handlePhotoLinkChange(event) { console.log("handlePhotoLinkChange"); setPhotoLink(event.target.value); } function handleSubmit(event) { event.preventDefault(); if (photoName.length > 0) { // TODO: // Use 'probe-image-size' library to determine width and height of the image the user passed in // Then, add a 'width' and 'height' key value to the 'formData' variable so that the // values are then added back to 'db.json' accordingly: // https://github.com/nodeca/probe-image-size const options = url.parse(photoLink); // 'http.get()' request so that I can obtain the image itself: http.get(options, function (response) { const chunks = []; response .on("data", function (chunk) { chunks.push(chunk); }) .on("end", function () { const buffer = Buffer.concat(chunks); console.log(sizeOf(buffer)); }); }); const formData = { photoName: photoName, photoLink: photoLink }; const dataArray = [...submittedData, formData]; setSubmittedData(dataArray); setPhotoName(""); setPhotoLink(""); setErrors([]); console.log("handleSubmit() called"); console.log("dataArray (before fetch() call): ", dataArray); fetch("http://localhost:3000/photos", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ dataArray: dataArray, }), }) .then((response) => response.json()) .then((response) => { console.log("response (from fetch request): ", response); }); } else { setErrors(["Name of photo is required!"]); } } const listOfSubmissions = submittedData.map((data, index) => { return ( {data.photoName} {data.photoLink} ); }); return ( Upload Image To Board Name: Link: Upload {errors.length > 0 ? errors.map((error, index) => ( {error} )) : null} Recent Submissions Below: {listOfSubmissions} ); } export default Upload;
-
Lazy loading images, so easy you wonβt believe it (a native strategy)
Again, there are multiple ways to get dimensions and your development pipeline might just provide this information by default. In case it doesn't, we have found a nice and small npm package called probe-image-size. It allows for 'probing' an image locally or remotely.
What are some alternatives?
When comparing pica and probe-image-size you can also consider the following projects:
sharp - High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
jimp - An image processing library written entirely in JavaScript for Node, with zero external or native dependencies.
gm - GraphicsMagick for node
cropper
lwip - Light Weight Image Processor for NodeJS
lena.js - :woman: Library for image processing
Korkut - Quick and simple image processing at the command line. :hammer:
fastimage - A module that finds the size and type of an image by fetching and reading as little data as needed.
is-progressive - Check if JPEG images are progressive
image-type - Detect the image type of a Buffer/Uint8Array