Could I replace .bmp textures resaved as JPEG or PNG, then renamed .bmp?
bpsperan
Posts: 15
I've collected a number DAZ & Poser models over the years, some of them purchases and some freebies. And I've noticed that some old ones actually use the old, inefficient .BMP format for textures. Considering how hugely wasteful the format is, compared to alternatives, I really try to avoid it. And it bothers me that some of my collection has textures that use up so much space. So I had an idea:
I know that I can't simply replace the .bmp textures with a copy saved as .jpg or .png as the software will still look for the .bmp textures. However, couldn't I just re-save these textures in either PNG or JPEG format, then rename the extension back to .bmp? Or could that potentially cause me problems later? Would DAZ automatically figure out that a texture with a ".bmp" extension is actually saved in a different format, despite the extension? (I've tried something similar with other software and found that it works, so even after I change the extension or format of images it can still figure out the right format.)

Comments
I didn't try that but I did convert files from jpg to PNG; and then edited the other daz files to load the PNG files instead of jpg.
Like, some of those .DUF files are in text format like HTML. So I load them with an ancient version of Dreamweaver and edit the text file, changing all the references to textures to look for the new files with the new extensions.
Edit: I just thought about that, but I'm speaking only about .duf files, some of these older products may be using older formats and I don't remember if I had to edit one them, so what I'm saying may only apply to .duf files and if you want to edit older formats, someone else will likely have to chime /Edit
I was not able to test directly what you thinking about (I don't have .bmp at hand) but renaming a .png file to .jpg and asking Daz Studio to use it as part of a surface settings lead to a pink surface in Iray Preview and a surface with gibberish in Texture Shadded mode: Daz Studio doesn't try to check if a .jpg file is actually a .png file (likely for performance reason considering the number of pictures files that can be used by a scene).
Your best bet is to convert all your .bmp files to .jpg or .png and then edit all the files calling the .bmp to replace .bmp by .jpg or .png.
You'll have to:
- uncompress the .duf files if necessary (Batch Convert is a tool included in Daz Studio that can do that)
- use a program like notepad++ capable of searching the content of a lot of text files and ask it to search and replace .bmp by .jpg or .png
- Bonus step: use Batch Convert to compress the files you just modified if they were compressed.
Daz is providing us uncompressed .duf files, so if the files you're speaking about are from products you bough here, you likely don't need to use Batch Convert to uncompress them. I would advice strongly to check if it's the case before using Batch Convert and if you do need to use Batch Convert, if the files you want to change are part of a huge library, I recommend to only select the folders where these files are located: Batch Convert can take a lot of time checking every files included in a big library (up to several hours and you can't use Daz Studio while it's doing it).
They are text files and they can be open by any program capable of editing text files with one caveat (more about that later). They are using the JSON syntax:
http://docs.daz3d.com/doku.php/public/dson_spec/start
Some will open to gibberish, because a .duf file can be compressed to save space: Daz doesn't usually use this functionnality with the files they are providing as part of the products they are selling to us but Daz Studio does have a batch convert tool to compress any file (or it can be done by any program capable of extracting gzip archives).
at a certain point it would be easier just to buy more space
If one wants to us a different de-compressor 7-zip is the one I use all of the time, due to being use to it as my go-to decompressor for everything zipped or rar'd and the options it offers.
Yes, you can do this, a program on ShareCG did it, batch-converted compressed DUF files by replacing .bmp lines with .jpg, but that is now gone. It has to be paired with a batch texture converter. One can be found in Adobe Photoshop, under File -> Scripts -> Image Processor. You woud not want to do it by hand if you need to process many files, as it becomes too tedious.
Converting BMP to JPG/PNG then change file name back to BMP won't work. DS cannot load them correctly ~~ As Elor suggested, replacing .BMP with .JPG/.PNG in DUFs(and Poser format) is the only way. Batch replacing will Notepad++ will be pretty fast.
Then strongly recommend this strong freeware which can easily filter out BMP and batch convert to whatever IMAGE format. https://www.xnview.com/en/xnview/
However, I myself definitely prefer the way as lilweep mentioned.