← All content

Refining My Inventory Management Workflow with Automated Image Processing

December 5, 2023· Jorge Iglesias· Photography, Software Development

As I continue to organize my home PC parts inventory, I've found that I not only have brought myself satisfaction in bringing order to my pc parts, but like with all other hobbies that I embark on, I've also added hours of work and in this case, the additional work is related to photographing and processing images of each component.

My Old Photography Workflow:

  1. Set up proper lighting and clear my table to ensure the product is the sole focus.
  2. Capture multiple images of each product using my iPhone 13 Max Pro.
  3. Initiate iCloud sync by opening the Photos app on my phone.
  4. Wait for the images to appear in the Photos app on my MacBook Pro (MBP).
  5. Select and open the latest product images in Photoshop for editing.
  6. Process each file in Photoshop, adjusting the width to 800px, lowering the quality during export and removing any metadata.
  7. Save the edited files to a new directory and upload them to my inventory app, PartsDB.

Planned Workflow Improvements:

I aim to elevate my workflow by switching from my iPhone to a Canon 80D DSLR and incorporating a script to automate the photo editing process. This script now includes several advanced features that enhance its functionality:

  • Configurable Watermark: The script can now add a customizable watermark with an adjustable position and opacity, enhancing the branding of the images for online use.
  • Filename Customization: I've introduced the ability to configure the naming convention of processed files, ensuring better organization and preventing overwrites.
  • Enhanced Font Selection: For the watermark text, the script utilizes the elegant Helvetica Neue font, providing a professional appearance.

Updated Basic Instructions for Automation:

To implement these improvements, follow these updated instructions:

  1. Install ImageMagick: This powerful image processing suite is key to the automation process. Install it using Homebrew with the command brew install imagemagick.
  2. Create the Script: Craft a bash script that will monitor a directory and automatically apply image optimizations.
  3. Install fswatch: This tool monitors file system events and triggers the script to process new images.
  4. Set Permissions: Ensure your script is executable with chmod +x /path/to/your/script.sh.
  5. Run the Script: Start the script to begin monitoring the specified folder for new images.

***I use a MacBook Pro, so instructions for you may be different.

With these enhancements, the script not only automates the task of image optimization but also adds a layer of customization and sophistication to the inventory management process.

My New Photography Workflow:

  1. Set up proper lighting and clear my table to ensure the product is the sole focus.
  2. Capture multiple images of each product using my iPhone 13 Max Pro.
  3. Initiate iCloud sync by opening the Photos app on my phone.
  4. Wait for the images to appear in the Photos app on my MacBook Pro (MBP).
  5. Ensure the script is running with my preferred settings
  6. Drag a file from the Photos app to a predefined Input folder, wait for updated files to show up in a Processed folder
  7. Upload images from the Processed folder to the PartsDB inventory app.

I've also found that I started using this script for images that I want to publish on websites, as the script optimizes and adds watermarks, which is a requirement of mine for website management.

I made this script available here on GitHub.

Share