Oct 26, 2017 The main way to shrink an image is to lower the picture resolution. If you have a file that is 4000×2500, then reducing the size to 2000×1250 will make the file half the size. You'll obviously be losing a large chunk of the original image in the data, but depending on your purpose, it may not matter. The resize option can be used with the Screenshot of the Whole Window option. For instance, if you want the screenshots to be of 660 Width and 440 Height, just input the values and check the Resize option. Any screenshot taken through the While Window option will be automatically resized before it is saved in the output folder. Jan 30, 2020 The PNG file format is great for screenshots, but the defaults output is too large for sharing on the internet. Instead of using ImageAlpha and ImageOptim to compress your screenshots by hand, you can use Hazel to automate this to regularly yield file size reductions of 80%.
- How To Reduce File Size
- How To Reduce Size Of Screenshot For A
- How To Reduce Size Of Screenshot Keyboard Shortcut
Terminal command (copy and paste this):defaults write com.apple.screencapture type jpgThis video shows you how to use a single terminal command on your mac c.
How to compress your screenshots automatically with pngquant and zopfli
This blog post is Unfiltered
Updated 2020-02-03: Added macOS Automator instructions.
I take screenshots every day to share with others in issues, blog posts andSlack. I like them to be crisp, high resolution, and importantly the file sizeshould be as small as possible. Keeping the file size small means they are bothfast to upload and to download. This is particularly important when I amwriting a blog post or documentation.
Below is a quick primer on PNG compression, and instructions for completelyautomating the process.
When you capture a screenshot on your Mac, it will be saved in the PNG-32format, with support for 16 million distinct colors and transparency. This meansthat the screenshot will perfectly capture every pixel on your screen, buthaving four 8-bit channels for red, green, blue and alpha (transparency) forevery pixel makes the file very large. If you're interested, you can verify thisyourself using pngcheck.
In practice, the subjects of my screenshots are buttons and forms, notphotographs. Since we don't need 16 million colors, we can take advantage of thePNG-8 format with it's more compact 256 color palette.
Lossy Compression: Color Quantization
The first step is to reduce the color palette of the screenshot. This is a typeof lossy compression called colorquantization, which willreduce the number of distinct colors in the image. Thepngquant command line utility is the perfect tool forthis job, and if you've used the popular ImageAlphatool, you've already used the pngquant library.
The screenshots below illustrate different levels of palette size reduction. Serious sam the first encounter mods.
PNG-32 (134KB) | 256 colors (42KB) | 128 colors (39KB) | 64 colors (38KB) |
---|
32 colors (37KB) | 16 colors (29KB) | 8 colors (22KB) | 4 colors (16KB) |
---|
I've observed for most screenshots you can comfortably reduce the color paletteto as few as 64 colors before it becomes noticeable. If you frequently takescreenshots of gradients or more complex images, you may want to stick with 256colors to avoid noticeable artifacts.
Lossless Compression: DEFLATE
The PNG file format uses DEFLATEcompression internally for an added layer of lossless compression, but most PNGlibraries do not implement aggressive lossless compression. This providesanother opportunity to reduce the file size further.
In 2013, Google released zopfli, whichclaimed to improve compression by 3-8% compared to zlib
. The trade off forthis improvement: waiting an extra 1-2 seconds. (There is no decompressionpenalty when viewing the compressed image).
Relative to the massive savings from color quantization, improving losslesscompression provides a much smaller reduction, but in the context of pages withmany images these marginal gains do add up to worthwhile savings.
Automation
The trick is to make this happen automatically every time I capture a screenshotusing Hazel orAutomator. Thisallows you to run commands based on file events, like every time a newscreenshot is added to a directory.
A bonus trick, is to create a dedicated Screenshots directory, so that theydon't clutter your desktop. This is also easy:
Acpi sny5001 driver windows 10. Using Hazel, add the Screenshots folder where newly captured screenshots will becreated, and create a new rule to compress files when they are added. Combiningthe commands above, and using $1
syntax to access the filename argument passedby Hazel, the final script is:
Alternatively, using Automator, create a new Folder Action that receivesnotifications from the Screenshots folder. Add a Run Shell Script block, andmake sure to Pass input as arguments. Combining the commands above, and thistime using $@
syntax to handle multiple arguments, and absolute paths forpngquant and zopflipng, the final script is:
Here's a screenshot of my configuration.
Hazel | Automator |
---|
My final trick, is to add the Screenshots folder to my Dock for easy access.This is achieved by dragging the Screenshots folder from Finder to your Dock.
Summary
The PNG file format is great for screenshots, but the defaults output is toolarge for sharing on the internet. Instead of using ImageAlpha and ImageOptim tocompress your screenshots by hand, you can use Hazel to automate this toregularly yield file size reductions of 80%.
Adobe dreamweaver cc 2018 for mac crack full download. If you know of compression tricks, or alternatives that work on Windows orLinux, let me know below in the comments! https://truesfile702.weebly.com/toyota-techstream-software-for-mac.html.
How To Reduce File Size
Cover image by Emmy Smith on Unsplash
More Posts Like This:
Try all GitLab features - free for 30 days
GitLab is more than just source code management or CI/CD. It is a full software development lifecycle & DevOps tool in a single application.
Try GitLab FreeHow To Reduce Size Of Screenshot For A
TryGitLabrisk-free for 30 days.
How To Reduce Size Of Screenshot Keyboard Shortcut
No credit card required. Have questions?Contact us.