Does DAZ Studio 4.6 support LZW compressed TIF files?

CypherFOXCypherFOX Posts: 3,401
edited December 1969 in Daz Studio Discussion

Greetings,
I'm asking because there's a significant amount of disk space taken up by Very Large Textures that are in apparently uncompressed TIFF form. If I could LZW compress them it would save me gigabytes of storage, easily.

I know this is a niche question, but it'd be really helpful to know!

-- Morgan

Comments

  • frank0314frank0314 Posts: 14,254
    edited December 1969

    If you have photoshop or Gimp you could take the .tiff's and re-save as jpg. It's gonna be a pain to do it that way cause you'll have to reset up the diffuse and bump maps and re-save as a duf. Maybe someone else can think of an easier way but that's all I can think of atm.

  • CypherFOXCypherFOX Posts: 3,401
    edited June 2014

    Greetings,

    Frank0314 said:
    If you have photoshop or Gimp you could take the .tiff's and re-save as jpg. It's gonna be a pain to do it that way cause you'll have to reset up the diffuse and bump maps and re-save as a duf. Maybe someone else can think of an easier way but that's all I can think of atm.
    I can do the conversions to jpeg automatically if I wanted to (just a small shell script).

    The reason I wanted to leave them as TIFF files (i.e. not change the filename, just add a compression level to them) is that any existing DUF files which apply those textures will name them by their full name, including extension, and that'd just be WAY too much a PITA to find and fix existing .duf, .dsf, and who-knows-what-else.

    The other reason not to convert to JPEG is that JPEG is lossy, and while that rarely matters for the colors of clothing, it matters a LOT for normals and displacement. But the specifically-referenced-filename problem is an even bigger one, so that is a non-starter.

    The answer, though, is yes. I found a few TIFF files in the texture directory that are already LZW compressed. I have a command-line tool that will in-place compress TIFF files, so I think I'm going to go do that with any that I find that aren't. (For example Luthbelina's new outfit's displacement maps are uncompressed TIFF files.)

    I already do this with DSF files; if I find new DSF files in my library that aren't gzipped, I gzip them, delete the uncompressed versions, and rename the gzipped version to *.dsf again. Saves me dozens of gigs, which matters a lot on my laptop.

    -- Morgan

    Post edited by CypherFOX on
  • barbultbarbult Posts: 24,736
    edited December 1969

    Cypherfox said:
    Greetings,
    Frank0314 said:
    If you have photoshop or Gimp you could take the .tiff's and re-save as jpg. It's gonna be a pain to do it that way cause you'll have to reset up the diffuse and bump maps and re-save as a duf. Maybe someone else can think of an easier way but that's all I can think of atm.
    I can do the conversions to jpeg automatically if I wanted to (just a small shell script).

    The reason I wanted to leave them as TIFF files (i.e. not change the filename, just add a compression level to them) is that any existing DUF files which apply those textures will name them by their full name, including extension, and that'd just be WAY too much a PITA to find and fix existing .duf, .dsf, and who-knows-what-else.

    The other reason not to convert to JPEG is that JPEG is lossy, and while that rarely matters for the colors of clothing, it matters a LOT for normals and displacement. But the specifically-referenced-filename problem is an even bigger one, so that is a non-starter.

    The answer, though, is yes. I found a few TIFF files in the texture directory that are already LZW compressed. I have a command-line tool that will in-place compress TIFF files, so I think I'm going to go do that with any that I find that aren't. (For example Luthbelina's new outfit's displacement maps are uncompressed TIFF files.)

    I already do this with DSF files; if I find new DSF files in my library that aren't gzipped, I gzip them, delete the uncompressed versions, and rename the gzipped version to *.dsf again. Saves me dozens of gigs, which matters a lot on my laptop.

    -- Morgan

    That is a great idea, Morgan. What command line tool do you use to compress your TIFF files?

  • CypherFOXCypherFOX Posts: 3,401
    edited December 1969

    Greetings,

    barbult said:
    That is a great idea, Morgan. What command line tool do you use to compress your TIFF files?
    It's named 'tiffutil' and I think it comes with Mac OS X, and I use it like this:

    tiffutil -lzw Olympia_Face_NM.tif -out Olympia_Face_NM-c.tif
    mv Olympia_Face_NM.tif raw-Olympia_Face_NM.tif
    mv Olympia_Face_NM-c.tif Olympia_Face_NM.tif
    Mind you that's all scripted, so it's more like:
    tiffutil -lzw $1 -out tmp.tiff
    mv $1 raw-$1
    mv tmp.tiff $1

    Then I can either delete the raw-* files, or move them someplace safe (and off my local box) if I'm super concerned. (I'm not. I can always revert, restore, or re-install if I screw something up.)

    I'm fairly sure you could compile tiffutil for other platforms, but I couldn't give you details offhand...

    -- Morgan

  • barbultbarbult Posts: 24,736
    edited June 2014

    Cypherfox said:
    Greetings,
    barbult said:
    That is a great idea, Morgan. What command line tool do you use to compress your TIFF files?
    It's named 'tiffutil' and I think it comes with Mac OS X, and I use it like this:

    tiffutil -lzw Olympia_Face_NM.tif -out Olympia_Face_NM-c.tif
    mv Olympia_Face_NM.tif raw-Olympia_Face_NM.tif
    mv Olympia_Face_NM-c.tif Olympia_Face_NM.tif
    Mind you that's all scripted, so it's more like:
    tiffutil -lzw $1 -out tmp.tiff
    mv $1 raw-$1
    mv tmp.tiff $1

    Then I can either delete the raw-* files, or move them someplace safe (and off my local box) if I'm super concerned. (I'm not. I can always revert, restore, or re-install if I screw something up.)

    I'm fairly sure you could compile tiffutil for other platforms, but I couldn't give you details offhand...

    -- Morgan

    Thanks for the details. I use Windows 7, and so far (Google search) I haven't been able to find the same kind of tool. I hope someone can suggest one. Maybe I could create a Photoshop action to open the file and resave it with LZW compression.

    Post edited by barbult on
  • Takeo.KenseiTakeo.Kensei Posts: 1,303
    edited December 1969

    You can use TDLmake which is part of 3delight utilities. It is already included in DAZ bin directory. Manual is here http://www.3delight.com/en/uploads/docs/3delight/3delight_12.html

    As LZW is already active by default the conversion should be straightforword : tdlmake inputfile.tif outputfile.tif

    Otherwise you could use some free tools I guess. I do have the option to convert inside Xnview and there is also a batch conversion option in XnviewMP. See http://www.xnview.com/en/xnview/

    If you like command like you could also use ImageMagic http://www.imagemagick.org/script/command-line-options.php

    It would be easy to convert a whole directory also with command lines using "Forfiles" command on Windows

Sign In or Register to comment.