Bulk reduction in all images in a directory?
I am not sure my title conveys my concern, but when I pay $$ for some content, I desire to archive my investment in a catalog, where I save the ZIP and PROMO images. The problem I have is some vendors make their promo images up to 3K pixels high, and 5MB in size. Now, with a 1920x1080 display, a 3K pixel image is always scaled to 33%, so of no added value. I understand why a vedor wants high-res - to show their effort, but I have no need to archive such high-res times a dozen PROMO images!
What I seek is a simple tool to aim at a directory with .JPG, .WEBP, and .PNG files, to them reduce the size of images. For example scale the max dimension to 1K and reduce the compression quality to maybe 85% (not 98%)?
Today I do this manually in GIMP. It often reduces file size by from 50% to 90%, but it is drugery. Does anyone know of a tool I can aim at a directory, then have it reduce images to a predefined max quality?
Thanks
Comments
I'm on a Mac, but before I retired, I used PCs and IrfanView was a very nice image processor. And I believe it's still free.
Here's a link with some info on reducing image file size using the batch converter...
https://www.irfanview.com/faq.htm#PAGE6
Scroll down to the topic: Q: How to reduce saved file size from XX to YY KB?
There might be additional info in that FAQ that could help you decide if IrfanView is a good solution.
Hope that helps a little!
Lee
This sounds like something that could be batch processed using GIMP actually. Might want to search for info on the GIMP boards. It is an incredibly powerful piece of software with a huge community.
True GIMP might do. I'm also a long-time user of Irfan - hadn't thought it might do batch. I played with it now. I certain does the job, but a lot of clicks & risk for error (like saving reduced files to LAST directory scanned, not current). I suppose it makes sense - a gazillion ways to batch-convert. I aimed it a a catalog directory of a Pretty3D clothing item, reduced size of 5 images from total 2.8MB down to 750KB (less than 150K each). That was certainly the goal! Thanks.
So glad IrfanView worked. I looked at the GIMP site and didn't immediately see where there was anything other than command line batch conversions. Perhaps there's a plug-in to allow that or an update to GIMP?
Lee
GIMP does support Python! And I'm a bit of a python guru. Then again, I have contiplated (& dreaded) the idea of making my own tree-walking Python script. I know python can load images as objects; I assume one could scale/compress said objects & save out. But it seems my goal is not that out of the norm that Id' need to make my own tool. Irfan's enough of a pain I probably won't go back and reduce old content, but I can certainly do the reduce going forward! For example, my 'new acct' was created just because I redid my DAZ directories and did NOT want DIM to download & install 15 years of V3, V4, V5, and V6 stuff! Since I moved on to DAZ and G8F, I am only manually selectively re-installing old props and such.
GIMP does support Python! And I'm a bit of a python guru. Then again, I have contiplated (& dreaded) the idea of making my own tree-walking Python script. I know python can load images as objects; I assume one could scale/compress said objects & save out. But it seems my goal is not that out of the norm that Id' need to make my own tool. Irfan's enough of a pain I probably won't go back and reduce old content, but I can certainly do the reduce going forward! For example, my 'new acct' was created just because I redid my DAZ directories and did NOT want DIM to download & install 15 years of V3, V4, V5, and V6 stuff! Since I moved on to DAZ and G8F, I am only manually selectively re-installing old props and such.
Once upon a time, I was a software engineer, mostly in the aerospace field, and loved to go in and learn new programming/scripting languages. Now I'm old and lazy. LOL!
I know you'll be able to find and/or create an awesome solution for your needs. :)
Lee
No need to write your own script for this in GIMP.
https://www.gimp.org/tutorials/Basic_Batch/
Edit: OOPS looks like that page doesn't actually have samples scripts for resize, but google shows several sets of different directions for batch resizing in GIMP.
Actually, in practice, IrfanView works pretty well. For example brought that FrontLine Hero bundle, so saved all the promos (147 or so) into my downloads. First I reduced all *.JPG to max heigth of 1000px and file-size of 150K, then converted all .WEBP to .JPG with same rules. If converted a few 1MB+ jpgs to 150K. For the WEBP, I then had to manually compare file size. A few 200-300K WEBP file were reduced. A few tiny 40K WEBP's got made into 150K JPG , so I just kept the WEBP on a file-by-file basis. With the directory sorted by name, it was easy to compare the pairs. There is a 'don't increase smaller size' option, but I guess that doesn't apply to conversions. Probably cut the bulk by 70%, but that was largely because some of the hospital room-scene promos had the massive 1MB+ sizes. Then I drag-droped the promos into the individual package subdirectories in my catalog-archive along with the ZIPS and a PDF of the DAZ order.
(As to why I do this - I'm actually a contract programmer for a small local firm. They have a medical device "IoT cloud', where 90% of their product 'design & specification' says something like "see Xively docs". Problem is, Xively was purchased by Google and snuffed-out! Their domain was even decommissioned last Nov 2020. So this small company really lost most of their specs. Now, they do have a cloud-firm which they paid to migrate the actual cloud data & scripts to another platform, but that all 'mimics' Xiviely, which no longer has documentation! Really sucks! Anyway, long-story-short, one cannot trust ONLINE docs not to vanish. I do see that happening with DAZ. More & more of my older V4/A4 items (& props from that era) no longer exist on DAZ's web site beyond a single page in the 'docs' section. Since I paid money for them, I feel entitled to 'retain' the files & promo images myself.)