If you run the PNGQuant first followed by the ImageMagick command, you may end up with a less compressed image. Under the Save To section in the menu, you’ll see a checkmark beside the location where screenshots are currently saved (such as Desktop. In the screenshots toolbar that appears, click Options. If your screenshots aren’t showing up on your desktop, press Shift+Command+5. ![]() If you choose to run both the ImageMagick and PNGQuant commands together, run the ImageMagick command first. How to See Where Mac Screenshots are Saved. You can either run the PNGQuant command by itself against a freshly captured screenshot or against a resized screenshot. If you prefer to keep the original copy of the image, just remove the -force -ext=.png options. The -force -ext=.png command technically mutates the image. With force, pngquant will overwrite the image with the compressed version.Without force, the command above will complain that the file name already exists.The -force works in conjunction with -ext.By default, PNGQuant creates an output file name ending with -fs8.png. The -ext=.png creates an image whose extension is a png.I personally always run PNGQuant with this option. The option -skip-if-larger skips the image compression process if the resulting image is larger than the input image.This is a job for PNGQuant.Īlthough ImageMagick also performs an image compression, I prefer to use PNGQuant because it has a cleaner API and produces a better output than ImageMagick (disclaimer: I actually haven't spent that much time with ImageMagick's compression tools - take my word with a heavy grain of salt and experiment around with ImageMagick compression tools yourself!) We can do a lossy compression of our image. Reducing an image from 2MB to 400KB is already a significant improvement. A good place to start is ImageMagick's resize documentation: Resize or Scaling (General Techniques). Some of you may think 50% is too small - if that's the case, feel free to play around with the resize option. That's a 80% reduction for a short one-line command! ![]() The file size is also reduced down to about 430KB. Running the convert command above reduces the dimension to 1792 x 1015. ![]() In my case, the resulting screenshot is 2.1MB and has a dimension of 3548 x 2030. Click on the window that you want to take a screenshot on. Try it! Take a screenshot of the current window with Cmd + Shift + 4 then press Space. The -resize 50% option will resize the input image by 50%. Enter fullscreen mode Exit fullscreen mode
0 Comments
Leave a Reply. |