INFO664: Programming for Cultural Heritage
Pratt Institute, Fall 2025
Created by Kelsey Kiantoro
Fashion archives face unique challenges. Unlike books that display titles on spines, garments hang in protective bags where identification relies entirely on external tags. This project addresses that specific need by automating the creation of physical bag tags that connect digital records to physical objects. Opening each bag to identify contents risks damage to fragile textiles and is incredibly time-consuming. External bag tags allow staff to browse collections visually, just like book spines on a shelf.
Image credit: Victoria and Albert Museum. From: 5 expert tips on how to store clothes. vogue.com.au
flowchart LR
Start[Researcher requests item] --> Choice{Tags?}
Choice -->|NO| Loop[Open bag → Check → Close]
Loop --> Loop
Loop --> Minutes[Minutes searching]
Hours --> Done[with ~5 minutes zipping the bags]
Choice -->|YES| Scan[Scan tags]
Scan --> Pull[Pull one bag]
Pull --> Done[Done]
style Start fill:#000,stroke:#fff,color:#fff
style Choice fill:#000,stroke:#fff,color:#fff
style Loop fill:#000,stroke:#fff,color:#fff
style Minutes fill:#000,stroke:#fff,color:#fff
style Scan fill:#000,stroke:#fff,color:#fff
style Pull fill:#000,stroke:#fff,color:#fff
style Done fill:#000,stroke:#fff,color:#fff
This chart was made with mermaid chart
With proper bag tags (like those used at the V&A), you can walk down the aisle, scan the tags, and pull the exact item immediately. But creating these tags manually? Opening Word and typing each field for hundreds of items? That's hours of repetitive work that this tutorial eliminates.
This workflow creates physical bag tag labels for hanging garments in fashion archives using a PDF-first approach. The main Python libraries used for this project are:
- ReportLab Canvas - Draws the 2×2 label grid on letter-size pages (8.5" × 11")
- PIL Image Compression - Reduces photo file sizes from megabytes to kilobytes while maintaining identification quality
- BytesIO from io - Handles images in memory without creating temporary files, speeding up processing
- os.path - checking with the machine to verify image files exist
ReportLab → Universal PDF output works on any printer. PIL/Pillow→ Compresses images from 5MB to 200KB without losing identification ability. pandas → Handles CSV files just like Excel. io.BytesIO → Processes images in machine memory. os → Prevents crashes when images are missing. This approach keeps output files under 10MB while processing huge amount of data.
Before running the label generator, think about how many items you have and plan accordingly:
- For medium collections (about ~30 items, as in our example): Use the standard 2x2 layout. This will create multiple pages automatically. We recommended having an even number; the sample is within an odd number for example purposes.
- For large collections (100 or more items): Process your data in batches of 50 items. Each batch is written to its own output file for printing. This code automatically figures out how many pages are needed and handles cases where the last page isn’t complete. This means you don’t need to change any code to work with different collection sizes.
Start here: Introduction
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
