Package: picopt
picoptA multi-format, recursive, multiprocessor aware, command line, lossless image
optimizer utility that can use external tools for even better optimizing.Picopt will optionally drop hidden timestamps at the root of your image
directories to avoid reoptimizing images picopt has already optimized.💭Conversion PhilosophyWarningPicopt transforms images in place and throws out the old image. Always have a
backup of images before running picopt in case you are not satisfied with the
results.Lossy ImagesConverting lossy images rarely makes sense and so picopt only optimizes them in
their current format.JPEG images are optimized with MozJpeg's jpegtran.WEBP Lossy images are not optimized. There is no current way to preserve
information without running it through a lossy process again.Lossless ImagesLossless WebP images are smaller than PNG, much smaller than GIF and, of course,
a great deal smaller thein uncompressed bitmaps like BMP. As such the best
practice is probably to convert all lossless images to WebP Lossless as now all
major browsers support it. The only downside is that decoding WebP Lossless
takes on average 50% more CPU than PNG. All major desktop and mobile browsers
support WEBP. WEBP is the lossless format of choice. Until perhaps JPEG XL
support arrives for browsers.Sequenced ImagesSequenced Images, like animated GIFs and WebP, most of the time, should be
converted to a compressed video format like HEVC, VVC, VP9 or VP10. There are
several situations where this is impractical and so Animated WebP is now a good
substitute.ConversionBy default picopt does not convert images between formats. You must turn on
conversion to PNG or WebP explicitly.🖼️FormatsBy default picopt will optimize GIF, JPEG, PNG, and WEBP images.Picopt can optionally optimize SVG images, ZIP, ePub, and CBZ containers.Picopt can convert many lossless images such as BMP, CBR, CUR, DIB, FITS, GIF,
IMT, PCX, PIXAR, PNG, PPM, PSD, QOI, SGI, SPIDER, SUN, TGA, TIFF, XBM, and XPM
into PNG and WEBP.Picopt can convert Animated GIF, TIFF, and FLI into Animated PNG or WebP
files.Picopt can convert Animated GIF, TIFF, FLI, and PNG into Animated WebP files.Picopt can convert MPO to JPEG by stripping secondary images if a primary
image exists. (Experimental)Picopt can convert RAR files into Zipfiles and CBR files into CBZ files.Because picopt supports so many lossless image formats, to avoid surprises if
you specify a conversion target, picopt will only convert GIF and PNG images to
the target by default. To convert another format, like BMP, to WEBP you must
specify that you want to read the BMP formatandthat you want t:qo convert it
to WEBP:picopt-xBMP-cWEBPbig_old.bmpJPEGTo optimize JPEG images at all picopt needs one ofmozjpegorjpegtranon the path. in order of preference.PNG & APNGPicopt uses an internal oxipng python module to to optimize PNG images and
convert other lossless formats to PNG picopt. The externalpngouttool can provide a small extra bit of
compression.Animated PNGs are optimized with the internal optimizer.Animated GIFGifs and Animated GIFs are optimized withgifsicleif available. or interaallly if is
not. Gifsicle only provides a small advantage over the internal optimizer.WebPWebP lossless formats are optimized withcwebpif available and
with the internal optimizer if not. cwebp provides significant improvements over
the internal optimizer.SVGPicopt can only optimize SVGs ifsvgois on the
path.MPO (Experimental)Picopt can extract the primary image from an multi JPEG MPO that also contains
thumbnails and convert the file to an ordinary JPEG. Picopt will also optimize
this image if it can. To enable this you must run with-x MPO -c JPEGSteroscopic MPOs should have no primary image tagged in the MPO directory and be
unaffected.This feature has not been tested with a large variety of MPOs and should be
considered experimental.EPubEPub Books are zip files that often contain images and picopt unpacks and
repacks this format natively. Images within the epub are handled by other
programs. EPub optimization is not turned on by default. EPub contents are never
converted to other formats because it would break internal references to them.CBZ & CBRPicopt uncompresses, optimizes and rezipscomic book archive files. Be
aware that CBR rar archives may only be rezipped into CBZs instead of CBR. Comic
book archive optimization is not turned on by default to prevent surprises.📦InstallSystem Dependenciespicopt is most effective with ependencies to run. We must install these firstmacOSbrewinstallgifsiclemozjpegsvgowebp

ln-s$(brew--prefix)/opt/mozjpeg/bin/jpegtran/usr/local/bin/mozjpegDebian / Ubuntuapt-getinstallgifsiclepython-imagingwebpif you don't want to install mozjpeg using the instructions below then use
jpegtran:apt-getinstalllibjpeg-progsSee mozjepg, pngout & svgo install instructions belowRedhat / Fedorayuminstallgifsiclepython-imaginglibwebp-toolsif you don't want to install mozjpeg using the instructions below then use
jpegtran:yuminstalllibjpeg-progsSee mozjepg, pngout & svgo install instructions belowPicopt python packagepipinstallpicopt⚙️External ProgramsPicopt will perform optimization on most lossless formats without using external
programs, but much more compression is possible if these external programs are
on your path.mozjpegmozjpeg offers better compression than libjpeg-progs jpegtran. It may or may not
be packaged for your *nix, but even when it is, picopt requires that its
separately compiled version of jpegtran be symlinked to 'mozjpeg' somewhere in
the path.Instructions for installing on macOS are given above. Some near recent binaries
for Windows and Debian x86can be found here. Most Linux
distributions still require a more manual install as elucidated here onCasey Hoffer's blogpngoutpngout is a compression tool that can be used for small extra compression. It
does not run on 16 bit PNGs.It can be installed on macOS with:brewinstalljonof/kenutils/pngoutIt is not packaged for linux, but you may find the latest binary versionon JonoF's site. Picopt looks for the binary
to be calledpngoutsvgosvgo compresses SVGs. Svgo is packaged for homebrew, but picopt can also use it
if it's installed with npm.On LinuxTo install svgo on Linux you can use the snap tool:snapinstallsvgoOr you can install svgo with npm:npminstall-Gsvgo⌨️Usage ExamplesOptimize all JPEG files in a directory:picopt*.jpgOptimize all files and recurse directories:picopt-r*Optimize files, recurse directories, also optimize ePub & CBZ containers,
convert lossless images into WEBP, convert CBR into CBZ.picopt-rxEPUB,CBR,CBZ-cWEBP,CBZ*Optimize files and recurse directories AND optimize comic book archives:picopt-rxCBZ*Optimize comic directory recursively. Convert CBRs to CBZ. Convert lossless
images, including TIFF, to lossless WEBP. Do not follow symlinks. Set
timestamps.picopt-rStcCBZ,WEBP-xTIFF,CBR,CBZ/Volumes/Media/ComicsOptimize all files, but only JPEG format files:picopt-fJPEG*Optimize files and containers, but not JPEGS:picopt-fGIF,PNG,WEBP,ZIP,CBZ,EPUB*Optimize files, but not animated gifs:picopt-fPNG,WEBP,ZIP,CBZ,EPUB*Just list files picopt.py would try to optimize:picopt-L*Optimize pictures in my iPhoto library, but only after the last time I did this,
skipping symlinks to avoid duplicate work. Also drop a timestamp file so I don't
have to remember the last time I did this:picopt-rSt-D'2013 June 1 14:00''Pictures/iPhoto Library'📦PackagesPyPIArch Linux👀Alternativesimageminlooks to be an all in one
cli and gui solution with bundled libraries, so no awkward dependencies.Imageoptimis an all-in-one OS X GUI image
optimizer. Imageoptim command line usage is possible withan external program.