matyalatte / UE4-DDS-Tools

Texture modding tools for UE games
MIT License
69 stars 12 forks source link

Wrong flags in exported dds #41

Open matyalatte opened 6 months ago

matyalatte commented 6 months ago

I got two warnings when importing dds in GIMP.

dds_flags_warning

It uses DDSD_PITCH when it should use DDSD_LINEARSIZE. And it uses DDSD_LINEARSIZE when it should use DDSD_PITCH.

dds.py says

class DDS_FLAGS(IntEnum):
    PITCH = 0x8  # Use "w * h * bpp" for pitch_or_linear_size
    LINEARSIZE = 0x80000  # Use "w * bpp" for pitch_or_linear_size

but it should be

class DDS_FLAGS(IntEnum):
    PITCH = 0x8  # Use "w * bpp" for pitch_or_linear_size
    LINEARSIZE = 0x80000  # Use "w * h * bpp" for pitch_or_linear_size

Most of dds libraries don't care the flags but this should be fixed.