Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
AtticTelephone

How to resize a bunch of 128 sized textures to 64 fast?

Recommended Posts

So, I'm making a wad with System Shock textures, but the textures are all 128 units long and wide, and I want to also turn them all into flats, so how do I turn them into 64 unit sized textures for flat conversion?

Share this post


Link to post

Irfanview has a batch resize option (using at least some form of resampling) and is also pretty good for general image viewing and batch conversions.

Share this post


Link to post
4 minutes ago, Aurelius said:

Irfanview has a batch resize option (using at least some form of resampling) and is also pretty good for general image viewing and batch conversions.

What if I don't want to extract all the image files from the wad?

Share this post


Link to post

There’s no way to resize images while they’re in a wad, unless Slade has a fancy new feature im unaware of. Exporting lots of textures to PNG format is as simple as selecting the desired textures, right clicking, and exporting.

Share this post


Link to post

Using Irfanview is a really bad idea if there are transparent images present, so my preferred solution would be to install ImageMagick, then open a terminal/command prompt window (on Windows, shift+right click inside the folder in Explorer, and click "open command window here"), and type the following command:

magick mogrify -resize 50% *.png

Beware this overwrites all png files in the folder. If you want indexed-color images, you can use SLADE to convert the files after importing into your wad. Imagemagick can do that too but the only way I know how is writing a for-loop in shell scripting (like in Bash or Zsh).

Spoiler

For the curious:


for f in *.png; do magick convert $f -resize 50% PNG8:out/$f; done

This reuquires you to first create a folder named "out" inside the current folder, which is where the resized files will be saved. The exact same thing can be done with batch scripting on Windows, I am just not familiarized with the syntax; I just never bothered learning because there are a number of ways to install Bash on Windows anyway (Git, MSYS2, Cygwin...).

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×