Bukva & ScanPatch
Bukva Bukva
Did you ever hear about the secret texture library buried in the old PlayStation dev kit? It was a pile of unused maps that never made it into a game—almost like a ghost archive just waiting for someone to dig it up. I find the idea of forgotten assets fascinating, almost like a digital attic.
ScanPatch ScanPatch
Sounds like a perfect stash for my backup folder, but only if the textures are at least 4K and have proper UVs. I hate it when people find a “ghost” library and assume it’s usable without checking file format, compression, and MIP maps. If someone wants to dig it up, I’ll need a batch script to inventory everything and flag anything under 1024×1024. If it’s truly forgotten, maybe it’s just low‑res placeholders—no thanks, that’s not worth the clutter.
Bukva Bukva
Here’s a quick batch that does what you asked for. It scans a folder for image files, calls ImageMagick’s identify to get the dimensions, and writes any that are smaller than 1024×1024 to a log file. Just drop it into the folder you want to audit, adjust the PATH if your ImageMagick is elsewhere, and run it. @echo off setlocal enableextensions enabledelayedexpansion rem Set the folder you want to scan; leave it empty to use the current directory set "scanFolder=%~dp0" rem Create or clear the log file set "logFile=%scanFolder%texture_report.txt" if exist "%logFile%" del "%logFile%" rem Loop over common texture extensions for %%f in (*.png *.jpg *.jpeg *.tga *.dds *.bmp *.gif *.tiff) do ( rem Use ImageMagick to get width and height for /f "tokens=2 delims=," %%a in ('magick identify -format "%%w,%%h" "%%~f" 2^>nul') do ( set "width=%%a" set "height=%%b" if !width! lss 1024 if !height! lss 1024 ( echo %%~f ( !width!×!height! ) >> "%logFile%" ) ) ) echo Scan complete. See %logFile% for any textures under 1024×1024.
ScanPatch ScanPatch
Nice skeleton, but the inner loop never sets !height!—you only capture the width token. Also, if any images are in sRGB or linear HDR formats, identify won’t flag them. I’d add a check for .exr or .hdr and log those separately. And remember, a log file isn’t a good way to keep a clean outliner—export the list to CSV and load it into your asset manager so you can tag each texture with its correct UV set and compression level. Happy hunting, but keep an eye on the data.
Bukva Bukva
Good catch on the missing height token, that bug would have let every file slip through. Adding a branch for .exr and .hdr is smart too—those often hide their color space if you don’t check. Exporting to CSV is the way to go; once it lands in your asset manager you can tag UVs, compression, even the little quirks like whether it’s a low‑res placeholder or a proper 4K masterpiece. Happy hunting, and if you need a hand parsing the CSV into your database, just let me know.
ScanPatch ScanPatch
Sure thing. Just add a second loop for the HDR types and output comma‑separated rows: filename,width,height,format. Then you can pipe that into your database importer. If you run into any weird bit depths or missing EXIF tags, let me know and I’ll tweak the script. Happy sorting.
Bukva Bukva
@echo off setlocal enabledelayedexpansion rem Folder to scan – use current folder if none specified set "scanFolder=%~dp0" rem Output CSV file set "csvFile=%scanFolder%texture_report.csv" if exist "%csvFile%" del "%csvFile%" rem Header echo filename,width,height,format > "%csvFile%" rem ------------------------- rem Regular image formats rem ------------------------- for %%f in (*.png *.jpg *.jpeg *.tga *.dds *.bmp *.gif *.tiff) do ( for /f "tokens=1-2 delims=," %%a in ('magick identify -format "%%w,%%h" "%%~f" 2^>nul') do ( set "w=%%a" set "h=%%b" echo %%~f,!w!,!h!,Regular >> "%csvFile%" ) ) rem ------------------------- rem HDR formats rem ------------------------- for %%f in (*.exr *.hdr) do ( for /f "tokens=1-2 delims=," %%a in ('magick identify -format "%%w,%%h" "%%~f" 2^>nul') do ( set "w=%%a" set "h=%%b" echo %%~f,!w!,!h!,HDR >> "%csvFile%" ) ) echo Done. CSV ready at %csvFile%. If any files show up with weird bit depths or missing data, let me know and we can add more checks. Happy sorting.