- #LINUX IMAGEMAGICK SCRIPTS TO REDUCE PHOTO SIZE HOW TO#
- #LINUX IMAGEMAGICK SCRIPTS TO REDUCE PHOTO SIZE INSTALL#
This allows me to skip stripping the EXIF, then converting the image. Which can look something like: convert "myjpg.jpg" -resize 50% -strip "myjpg-reduced.jpg" I use Imagemagick to resize images from my camera, so I just chain the commands as follows: convert "" -resize % -strip ".jpg" If you reconvert enough, eventually the image will be unrecognizable unless it is lossless (though it can affect lossless images if you perform any operation on the image itself). Each reconvert of an image will affect the quality of the image.
This does impact the quality of the image because it does reconvert it. To just strip the EXIF data from the image, run:
#LINUX IMAGEMAGICK SCRIPTS TO REDUCE PHOTO SIZE INSTALL#
If you don’t want to install anything new, or you don’t care about a quality hit (see below for more about this), you can use Imagemagick to strip EXIF data from an image. Someone might be watching to see where you are and can know you’re away from home from the EXIF data. Think of this next time you put a picture online when you’re on vacation. Other data added in with identifying information can further narrow this down giving a clear picture of where you are and what you’re doing over a span of time. The date combined with the location data means that someone could know where I was and when, which can show patterns in my life, and show where I might be when taken in aggregate. If you’re trying to protect your privacy and avoiding metadata analysis, you want to strip the EXIF data. There’s nothing identifying in the block I copied, but there can be location coordinates and similar further in, as well as camera information which can be somewhat identifying when put together. This will throw back the EXIF data which looks like: $ identify -verbose june60.JPG | grep "exif"Įxif:DateTimeDigitized: 2019:11:02 12:38:59Įxif:DateTimeOriginal: 2019:11:02 12:38:59 If you just want the EXIF data, pipe this into grep and find EXIF data using: identify -verbose "" | grep "exif" You will get a huge block of various information about the image. Once that’s installed, we can go about viewing information about the image. See this article for more information about apt on Ubuntu and Debian. Install Imagemagick by running: sudo apt install imagemagick
#LINUX IMAGEMAGICK SCRIPTS TO REDUCE PHOTO SIZE HOW TO#
It’s also great for bulk image processing if you know how to script. It can convert images to different formats, resize, transform, and identify information about images. Imagemagick is a command line tool which is extremely powerful for image manipulation and provides libraries for many different languages for embedded image processing in applications.
This article just covers how to view the data and how to get rid of it and some alternatives. The instructions for installing are specific to Debian and Ubuntu, but the same packages most likely exist on your flavor of choice, but might be called something else.
Let’s learn how to both view this data and remove it on Debian and Ubuntu Linux. This is great for you, but not so great from a privacy perspective if you aren’t careful. It’s basically a way to embed camera settings, location data, etc.
EXIF data is great for knowing more about an image, but it can also leak information you don’t want to leak if the picture gets out there.