nodeca/image-blob-reduce hiện có 316 sao trên GitHub, viết chủ yếu bằng TypeScript. Resize image blobs with high quality. Pica's wrapper to work with file inputs.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
image-blob-reduce - downscale blobs with images inside
Wrapper for pica to work with blobs, with
some sugar.
This is a pica wrapper for convenient work with images from file input fields.
While pica works with raw bitmaps, this package operates with "image files".
Additional features are:
[jpeg] Apply orientation to the downscaled result.
[jpeg] Keep metadata, but with patched orientation and the original color
profile removed.
pica - a pica instance, if you want different defaults or a shared
web worker pool.
.toBlob(in_blob, options) => Promise(out_blob)
Downscale an image so its width and height fit within max*max pixels. For
example, { max: 1000 } limits the longest side to 1000 px; it does not limit
the output blob size in bytes. If the blob contains a JPEG, orientation is
applied and metadata from the original image is reused (with minimal changes).
Inject your custom handler before the specified method. See the .setup()
source code for an example.
.after(method_name, hook_fn)
The same as .before(), but the handler is injected after the specified
method.
.use(plugin_init, ...params) => this
Sugar to simplify the assignment of external plugins. Just calls
plugin_init(this, ...params).
.setup()
Configure the instance before first use. By default, installs the built-in JPEG
hooks. Override this method if you need to install custom plugins, add hooks or
replace pipeline methods before processing starts.
Reexports
import imageBlobReduce, { ImageBlobReduce, image_traverse, pica, Pica } from 'image-blob-reduce'
imageBlobReduce - default factory.
ImageBlobReduce - reducer constructor.
image_traverse - JPEG traversal helpers.
pica - pica factory.
Pica - pica constructor.
Legacy static fields are available only in UMD build:
window.imageBlobReduce.ImageBlobReduce
window.imageBlobReduce.image_traverse
window.imageBlobReduce.pica
window.imageBlobReduce.Pica
Customization
Since it's difficult to implement all possible options, this package is
specially designed for easy customization. See the source code first.
You can inherit from the class & replace existing methods.
You can add extra actions before/after existing methods.
You can override existing methods of an instance.
For example, if you wish to force output to always be JPEG with a certain
quality:
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/nodeca/image-blob-reduce là nguồn chính thức.
nodeca/image-blob-reduce có những chủ đề gì?
GitHub topics của nodeca/image-blob-reduce: "image", "resize". TopGit xếp repo vào nhóm Image Tools.
nodeca/image-blob-reduce có phải mã nguồn mở không?
Có — nodeca/image-blob-reduce phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/nodeca/image-blob-reduce.
nodeca/image-blob-reduce có trang demo không?
Dự án có trang chủ ở https://nodeca.github.io/image-blob-reduce/demo. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
nodeca/image-blob-reduce còn đang phát triển không?
Commit gần nhất trên nodeca/image-blob-reduce là 4 tháng trước (theo timestamp GitHub). Repo có 34 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
nodeca/image-blob-reduce dùng license gì?
nodeca/image-blob-reduce phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về image-blob-reduce?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về image-blob-reduce.