🧙 Go compressed file toolbox, image compress.

Lulu

🧙 Lulu(露露) 是一个文件压缩处理的工具箱。

使用前,务必先在测试服务器尝试安装 libvips 。

依赖

  • libvips
    • ⭐️ 这里提供另一种 libvips 的安装方式,通过手动指定依赖,这样可以避免 libvips 的安装出现不可控的问题(覆盖部分 C 基础组件)。
      1. 将本仓库的 libvips.so.42.13.3 存放至任意位置,假设存放在 /tmp
      2. cd /etc
      3. vi ld.so.conf,指定 so 文件的存放目录(/tmp)
      4. cd/sbin
      5. ldconfig -v

支持

  • 图片压缩
original before size 1.1 MB (1,070,107 bytes) compressed after 61 KB (62,060 bytes)
screenshot screenshot
$lulu image -h

压缩指定文件夹下的图片,支持多级文件夹。 例如: lulu image

Usage:
  lulu image [flags]

Flags:
  -d, --dir-path string   指定存放图片的文件夹,支持在多级文件夹下获取图片。
  -q, --quality string    指定压缩质量,压缩质量范围为 1(最低质量) - 100(最高质量),质量越低,图片大小越小。
  -s, --suffix string     指定待处理图片的后缀,目前支持 png,jpeg,jpg。

效果

编译

交叉编译,对我而言是非常恐怖的。推荐在环境中,安装 libvips。

常见问题

  • libvips

    # pkg-config --cflags vips vips vips vips
    Package vips was not found in the pkg-config search path.
    Perhaps you should add the directory containing `vips.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'vips' found
    

    解决方案:https://www.cxybb.com/article/a_c12345/101725160

Owner
龚国玮
you build it, you fix it
龚国玮
Similar Resources

A go compress library for fs.FS interface

compress: a go compress library for fs.FS interface Format Test Charset Decoder Encoder Password Info zip local true true true false used go std rar l

Aug 1, 2022

Maidenhead - This golang library compress and decompress latitude and longitude coordinates into Maidenhead locator

The Maidenhead Locator System (a.k.a. QTH Locator and IARU Locator) is a geocode system used by amateur radio operators to succinctly describe their geographic coordinates.

Dec 17, 2022

Simple and expressive toolbox written in Go

ugo Simple and expressive toolbox written with love and care in Go. Deeply inspired by underscore.js and has the same syntax and behaviour Fully cover

Sep 27, 2022

A toolbox for debugging docker container and kubernetes with web UI.

A toolbox for debugging docker container and kubernetes with web UI.

A toolbox for debugging Docker container and Kubernetes with visual web UI. You can start the debugging journey on any docker container host! You can

Oct 20, 2022

The Ultimate Engineer Toolbox YouTube 🔨 🔧

 The Ultimate Engineer Toolbox YouTube 🔨 🔧

The Ultimate Engineer Toolbox YouTube 🔨 🔧

Jan 8, 2023

Paprika is a toolbox for creating short clips from multiple png files.

Paprika is a toolbox for creating short clips from multiple png files.

Paprika Paprika is a toolbox for creating short clips from multiple png files. Requirements This program is mainly a wrapper around ffmpeg. As such, y

Feb 16, 2022

Pat - Performance Analysis Toolbox for Go programs.

Pat - Performance Analysis Toolbox for Go programs.

pat Performance Analysis Toolbox for Go programs. Usage Get with: go install github.com/maruel/pat/cmd/...@latest disfunc Disassemble a function at t

Sep 6, 2022

Orasql - An autonomous Oracle sql toolbox

orasql An autonomous Oracle sql toolbox Usage: Usage: ./orasql -dsn server_url

Jan 7, 2022

This is a simple file storage server. User can upload file, delete file and list file on the server.

This is a simple file storage server.  User can upload file,  delete file and list file on the server.

Simple File Storage Server This is a simple file storage server. User can upload file, delete file and list file on the server. If you want to build a

Jan 19, 2022

Convert scanned image PDF file to text annotated PDF file

Convert scanned image PDF file to text annotated PDF file

Jisui (自炊) This tool is PoC (Proof of Concept). Jisui is a helper tool to create e-book. Ordinary the scanned book have not text information, so you c

Dec 11, 2022

darkroom - An image proxy with changeable storage backends and image processing engines with focus on speed and resiliency.

darkroom - An image proxy with changeable storage backends and image processing engines with focus on speed and resiliency.

Darkroom - Yet Another Image Proxy Introduction Darkroom combines the storage backend and the image processor and acts as an Image Proxy on your image

Dec 6, 2022

k8s-image-swapper Mirror images into your own registry and swap image references automatically.

k8s-image-swapper Mirror images into your own registry and swap image references automatically.

k8s-image-swapper Mirror images into your own registry and swap image references automatically. k8s-image-swapper is a mutating webhook for Kubernetes

Dec 27, 2022

create a bootable disk image from Docker image or a yaml config

docker2boot docker2boot creates a bootable disk from either a Docker image or a config yaml file Features status dns Y cloud-init Y network Y ssh TODO

Oct 30, 2022

Easily customizable Social image (or Open graph image) generator

fancycard Easily customizable Social image (or Open graph image) generator Built with Go, Gin, GoQuery and Chromedp Build & Run Simply, Clone this rep

Jan 14, 2022

This action prints "true" if image is required to update based on the base image update.

container-image-updater This action prints "true" if image is required to update based on the base image update. Inputs Name Type Description base-ima

Apr 15, 2022

An API which allows you to upload an image and responds with the same image, stripped of EXIF data

strip-metadata This is an API which allows you to upload an image and responds with the same image, stripped of EXIF data. How to run You need to have

Nov 25, 2021

Go encoder and decoder for the NetBPM/PNM image formats. Compatible with Go's image packages.

gpnm This package implements an encoder and decoder for PNM image formats. It can be used with Go's image library. It covers all formats as defined by

Nov 26, 2021
Related tags
Sep 23, 2022
Package for indexing zip files and storing a compressed index

zipindex zipindex provides a size optimized representation of a zip file to allow decompressing the file without reading the zip file index. It will o

Nov 30, 2022
Statigz serves pre-compressed embedded files with http in Go

statigz statigz serves pre-compressed embedded files with http in Go 1.16 and later. Why? Since version 1.16 Go provides standard way to embed static

Dec 24, 2022
Ripgrep but for gzip-compressed files over http

Juicer It's ripgrep but for Gzip-compressed files over HTTP! This tool was primarily designed to scan thru the Common Crawl dataset for URLs without s

Feb 21, 2022
Ztgrep - Recursively search through compressed tarballs and files

ztgrep Search for file names and contents through nested archives. Useful for fi

Jun 7, 2022
Image - This repository holds supplementary Go image librariesThis repository holds supplementary Go image libraries

Go Images This repository holds supplementary Go image libraries. Download/Insta

Jan 5, 2022
Easily create & extract archives, and compress & decompress files of various formats

archiver Introducing Archiver 3.1 - a cross-platform, multi-format archive utility and Go library. A powerful and flexible library meets an elegant CL

Jan 7, 2023
Easily create & extract archives, and compress & decompress files of various formats

archiver Introducing Archiver 3.1 - a cross-platform, multi-format archive utility and Go library. A powerful and flexible library meets an elegant CL

Jan 3, 2023
UDP Transport: compress, encrypt and send any data reliably over unreliable UDP connections

udpt UDP Transport Compresses, encrypts and transfers data between a sender and receiver using UDP protocol. Features and Design Aims: Avoid the overh

Nov 5, 2022
A small CLI tool to compress and decompress files using Golang
A small CLI tool to compress and decompress files using Golang

Goflate A simple & small CLI tool to compress and decompress files using Golang Usage Install the binary to your local machine with the below command

May 27, 2022