Skip to content

DecodeAllMipMaps2D(DdsFile) returns empty array if dwMipMapCount is 0 even when there is a face with mip maps #64

@Crauzer

Description

@Crauzer

This issue arises from the fact that mip count is handled differently in DdsFile and in DecodeInternal.

These are the relevent lines:
https://github.com/Nominom/BCnEncoder.NET/blob/master/BCnEnc.Net/Decoder/BcDecoder.cs#L1161-L1164
https://github.com/Nominom/BCnEncoder.NET/blob/master/BCnEnc.Net/Shared/ImageFiles/DdsFile.cs#L57

I think the easiest way to fix this would to be assume that each file has at least 1 mipmap. Microsoft says that you shouldn't rely on the mipmap flag being set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions