Needed: Utility to convert BMP to PNG for ZDoom

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
marco75
Posts: 13
Joined: Sat Jul 21, 2007 6:48 am

Needed: Utility to convert BMP to PNG for ZDoom

Post by marco75 »

I have just read to my chagrin that ZDoom cannot read BMP graphics. This is unfortunate, since all the utilities I know of output images in RAW or BMP format.

I have tried three different image converters, but none of them support transparencies.

Also, the format used in KDIZD (I'm learning by example) is PNG32. Does this mean that by going through BMP8, I have lost colors in the process?

Do any of the custom monsters in the Bestiary even use colors outside of the 8-bit CLUT?

If they did, I find it hard to understand how that "CreateTranslation" palette swapping trick would work.

If someone could suggest a utility that can batch convert BMP to PNG, converting 00FFFF (cyan) to transparency, that would help a lot.

Also, I need to dump XWE (because it's so buggy & doesn't support PNG) and WinTex (doesn't support long filenames, unwieldy) and find something decent. I'm working with thousands of sprites for this project. If you know a program that can automate such tasks, let me know about it.

Thanks!
User avatar
Zippy
Posts: 3302
Joined: Wed Mar 23, 2005 5:31 pm
Location: New Jersey

Post by Zippy »

ZDoom doesn't support BMP, but it does support the Doom graphics format, and almost every program that deals with importing images into wads (like XWE) always convert the BMPs you load into Doom graphics format. The only time ZDoom not supporting BMPs would really be a problem is if you are using pk3s, in which case you must remember to convert the graphic to PNG (IrfanView should be able to do that), or Doom graphics format (XWE or SLumpEd.)
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Post by Matt »

Depending on your version MS Paint should be able to save images as PNG, but I've yet to figure out how to save transparencies and alpha channels with it.
User avatar
Nash
 
 
Posts: 17512
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Post by Nash »

To convert graphics that are already inside a WAD into PNGs (and retain transparency information), use SLumpEd.

Just select all the lumps you want to convert, right click then Convert to -> PNG.
Also, I need to dump XWE
Wise choice sir, wise choice. :mrgreen:
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Re: Needed: Utility to convert BMP to PNG for ZDoom

Post by Risen »

marco75 wrote:I have tried three different image converters, but none of them support transparencies.... Also, I need to dump XWE (because it's so buggy & doesn't support PNG) and WinTex (doesn't support long filenames, unwieldy) and find something decent. I'm working with thousands of sprites for this project. If you know a program that can automate such tasks, let me know about it.
I'll second both IrfanView and SlumpEd as good utilities.

marco75 wrote:Also, the format used in KDIZD (I'm learning by example) is PNG32. Does this mean that by going through BMP8, I have lost colors in the process?
Not necessarily.

If you are working with 8-bit color graphics in the correct palette, then you do not lose anything when bringing them into ZDoom. You also don't gain any quality by converting to 24-bit color. (32-bit graphics are still 24-bit color, but also add translucency.)

If you are working with 8-bit color graphics in a different palette than the one the game is using, you do lose quality when the images are imported as they need converted to the correct palette.

If you are working with 24-bit color graphics and downsampling to 8-bit when importing, you do lose color information.

It's important to note that ZDoom downsamples 24-bit graphics to match its palette automatically, because it cannot display colors outside its palette. You only get the benefit of 24-bit color graphics when playing with an enhanced renderer such as the one found in GZDoom.

Because of this, 24-bit color graphics must be carefully crafted if they are to show properly in ZDoom. If you're unfamiliar with the methods to do this, it's best to use 8-bit color in the proper palette right from the beginning.
User avatar
Kappes Buur
 
 
Posts: 4208
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada

Post by Kappes Buur »

User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

They were both linked previously, but I suppose that doesn't hurt.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Post by Gez »

IrfanView's great, can do batch editing. Very useful.

For fine-tuning of some details, you might want to use a full-blown image editor, like the GIMP (or Photoshop, but at least the GIMP is legally free).
marco75
Posts: 13
Joined: Sat Jul 21, 2007 6:48 am

PNG monster sprites in bestiary.zip displayed as <?> i

Post by marco75 »

I have just converted all the .BMP sprites I extracted from the bestiary to PNG, but now they won't show up in-game, instead they are replaced with a question mark!

I followed the KDIZD formula on how to get things done, but I can't get it to work! Could somebody help?
CaptainToenail
Posts: 3975
Joined: Fri Jul 06, 2007 9:16 am

Post by CaptainToenail »

I really need help with this too, I've got Slumped but the Import and Load buttons don't seem to do anything. I'm trying to import the green Chaos Serpent from Hexen sprites into Doom without losing colour quality. They seem to go grey for some reason using XWE.

http://forum.zdoom.org/potato.php?t=14480
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Post by Gez »

In Slumped, start by setting the main iwad to be Hexen, so that the colors will be appropriate. Copy the chaos serpent sprites to your wad, and right-click convert them to PNGs.

Then you can set the main iwad to be Doom.wad or Doom2.wad again.
CaptainToenail
Posts: 3975
Joined: Fri Jul 06, 2007 9:16 am

Post by CaptainToenail »

Copy the chaos serpent sprites to your wad
How do I do that, the Import button doesn't do anything, and this is really getting on my nerves! I can't work out how to actually load anything into the wad!

Edit: I worked out how to insert lumps.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Post by Gez »

CaptainToenail wrote:
Copy the chaos serpent sprites to your wad
How do I do that
Open both source and destination wads, thanks to the magic of tabs. In the hexen tab, right-click on something, select copy. In the newwad tab, rightclick on something, select paste.

It's not really hard, but you need a mouse with a right button. :D
CaptainToenail
Posts: 3975
Joined: Fri Jul 06, 2007 9:16 am

Post by CaptainToenail »

Lol, well I finally worked out how to do it, I had to use Slumped and the new XWE beta! Thanks for the help. :D
User avatar
Medricel
Posts: 1138
Joined: Sat Nov 20, 2004 9:47 am

Post by Medricel »

If you want to import PNG files in SLumpEd, use "New From File" in the Lump menu, not "Import." :thumb: Import is for replacing lumps, not adding new ones.

Return to “Editing (Archive)”