theweaselking: (Default)
[personal profile] theweaselking
Yes, yes, I know, two GPQs in a night. It's a bad, bad habit.


Due to what can only be described as a near-infinite supply of stupid, a co-worker has a large pile of 256-color bitmap files that all need to be converted to 24-bit bitmaps. Opening each one in MSPaint, selecting Save As, and changing the format is too slow.

How do I do this, all at once? OS of your choice (I have access to all of the sane ones, and also MacOS), software packages of your choice.

Bash and foreach or "find location -name .bmp" mean I can apply a command line to a large number of files at once - but what command line should it be?

EDIT: [livejournal.com profile] miz_geek points out the Irfanview can do this for the co-worker, inside windows. Yay!

[livejournal.com profile] jwz offers several linux solutions. Which work if I do it for the user, and so they DO meet the requirements, but irfan is faster and simpler for the end user.

(no subject)

Date: 2008-10-09 01:53 am (UTC)
From: [identity profile] lebongirl.livejournal.com
Are these all in the same folder? I believe Photoshop can batch convert. I know there are some utilities that can do this as well. Lemme research - will post links if I find any.

(no subject)

Date: 2008-10-09 01:54 am (UTC)
From: [identity profile] theweaselking.livejournal.com
Are these all in the same folder?

They can be. They can be anywhere I want them to be.

(no subject)

Date: 2008-10-09 01:56 am (UTC)
From: [identity profile] lebongirl.livejournal.com
I know it can be done - I have done it before (years ago). If the links I just posted aren't useful, let me know and I'll try to dig up something more specific.

(no subject)

Date: 2008-10-09 02:10 am (UTC)
From: [identity profile] theweaselking.livejournal.com
ABC watermarks the images unless you pay them $85.

(no subject)

Date: 2008-10-09 02:19 am (UTC)
From: [identity profile] lebongirl.livejournal.com
Photoshop does do it: http://onlinephototutorials.com/2008/07/30/batch-save-using-photoshop/

But I see you found a solution already. :)

(no subject)

Date: 2008-10-09 02:24 am (UTC)
From: [identity profile] theweaselking.livejournal.com
And, as a bonus, Irfan is free for educational use, which this project is!

(Hooking up photoshop would have been inconvenient. Doable, but inconvenient.

Thanks for your help!)

(no subject)

Date: 2008-10-09 02:28 am (UTC)
From: [identity profile] lebongirl.livejournal.com
And Photoshop was what I had at my disposal at the time (still do, just not on this computer). It was really bugging me to try to remember how I did this before w/o having to open all the files etc. Finally found what it was I did: http://winhowto.blogspot.com/2006/06/batch-convert-and-resize-images-with_26.html (within Photoshop).

Glad you found something free & easy!

(no subject)

Date: 2008-10-09 01:55 am (UTC)
From: [identity profile] lebongirl.livejournal.com
Ok found links faster than I thought:

http://www.google.com/search?hl=en&q=batch+convert+images&btnG=Google+Search&aq=f&oq=


Batch convert thru Photoshop: http://www.google.com/search?hl=en&q=batch+convert+images+photoshop&btnG=Search

(no subject)

Date: 2008-10-09 02:03 am (UTC)
From: [identity profile] miz-geek.livejournal.com
I'm pretty sure Irfanview can do it, too.

(no subject)

Date: 2008-10-09 02:16 am (UTC)
From: [identity profile] theweaselking.livejournal.com
Irfanview can! You are a winner!

Thank you.

ImageMagick

Date: 2008-10-09 02:13 am (UTC)
From: [identity profile] jwz.livejournal.com
If one of these doesn't work:

convert $file -depth 24 tmp.bmp && mv tmp.bmp $file

or

convert $file -colors 16777215 tmp.bmp && mv tmp.bmp $file

then this should work:

convert $file -depth 24 tmp.png && convert tmp.png tmp.bmp && mv tmp.bmp $file

Re: ImageMagick

Date: 2008-10-09 02:22 am (UTC)
From: [identity profile] theweaselking.livejournal.com
Workable! Not quite as user-friendly for this specific user as Irfanview was, but thanks a lot!

(no subject)

Date: 2008-10-09 04:26 am (UTC)
ext_8707: Taken in front of Carnegie Hall (bofh)
From: [identity profile] ronebofh.livejournal.com
ImageMagick's too newfangled for me. netpbm or nothing!

(no subject)

Date: 2008-10-09 12:13 pm (UTC)
From: [identity profile] jsbowden.livejournal.com
Isn't ImageMagick just a big giant front end for every graphics library ever written? I'm pretty sure it links against things that can only be found in the digital equivalent of L Space. Not that it's a bad thing mind you, if I'd seen this last night, I'd have suggested ImageMagick too.

(no subject)

Date: 2008-10-09 02:22 am (UTC)
From: [identity profile] harald387.livejournal.com
Due to what can only be described as a near-infinite supply of stupid

I assure you, you have no idea. Every single time I think I've found all of the possible things that could have been done wrong, I FIND ANOTHER.

Many thanks to everyone posting suggestions, we did get it to work, and have saved me a significant amount of time and headache.

(no subject)

Date: 2008-10-09 09:35 am (UTC)
From: [identity profile] ambug666.livejournal.com
You found a solution, but back when I was in the video games biz, years ago, we used Debabilizer. It's a pricey commercial package (assuming it's still around) that let you do batch image manipulations.

Profile

theweaselking: (Default)theweaselking
Page generated Feb. 7th, 2026 03:09 am