Doom picture format - Command line utility?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Doom picture format - Command line utility?

Postby Custodian » Wed Feb 10, 2021 5:48 pm

Simple question I couldn't find an answer to with google-fu and parsing this forum. Is there a command-line utility for converting a true-color image to a z/doom picture format? I'm hoping there exists something simple like this:

Code: Select allExpand view
./imageconverter -palette mypalette.pal -in texture.png -out texture.lmp


I wasn't able to find anything in the SLADE documentation that suggests I could use SLADE to perform this kind of action. I am using Node.js to manage my development environment, so it would be exceptionally helpful to be able to write scripts that can take files output from my design software, convert them, and then move them into my directory structure. I have created utilities that rename sprites and such, but I'd like to avoid having to manually convert my files to the doom graphics format. I am aware that ZDoom can support true color images, but for aesthetic purposes, I'm keeping everything to a strict palette.

EDIT: I should clarify, I am seeking a command line utility that can specifically export either an indexed or non-indexed image to the Doom Patch format.

EDIT2: The first step of converting to an indexed format isn't 100% essential. My editing software does not allow me to export an image with indexed color, but it will allow me to conform an image to a palette (and while designing the images, I'm strictly using colors from my palette.) So, my image outputs have only colors which are found in my palette, but they are not indexed.
User avatar
Custodian
 
Joined: 29 Jan 2021
Github ID: disasteroftheuniverse
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Doom picture format - Command line utility?

Postby MFG38 » Mon Feb 15, 2021 5:47 am

Custodian wrote:I wasn't able to find anything in the SLADE documentation that suggests I could use SLADE to perform this kind of action.


SLADE can actually convert non-Doom-format image files into Doom graphics. Just right-click on an image and then click on "Graphic" > "Convert to..." - this will open up the image conversion prompt. From the dropdown on the top, select the option "Doom Gfx (Paletted)" if it isn't already selected, tweak any of the settings below as needed and hit "Convert". Voilà - you have a Doom-format graphic!
User avatar
MFG38
 
Joined: 14 Apr 2019
Location: Finland
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: Doom picture format - Command line utility?

Postby Gez » Mon Feb 15, 2021 6:19 am

Custodian wrote:Simple question I couldn't find an answer to with google-fu and parsing this forum. Is there a command-line utility for converting a true-color image to a z/doom picture format? I'm hoping there exists something simple like this:

Code: Select allExpand view
./imageconverter -palette mypalette.pal -in texture.png -out texture.lmp


I wasn't able to find anything in the SLADE documentation that suggests I could use SLADE to perform this kind of action.

SLADE isn't a command-line tool, so while it can batch-convert a bunch of images at once, it indeed doesn't fit in the workflow you want to setup.

For command-line conversions, you'll want to look at DeuTex or JeuTool.
Gez
 
 
 
Joined: 06 Jul 2007


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 0 guests