You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DDS pictures inside other files still come out with red and blue swapped #741
#627 fixed the red/blue swap for DDS files converted on their own (and the crop window): after ImageMagick reads the file, DdsChannelOrder.Correct swaps the channels back for the R8G8B8A8 layout. A DDS that is part of another file is opened with MagickImage directly and still comes out swapped:
E-books, Markdown and HWP pictures:EbookFiles.CommonImage converts pictures that aren't JPEG/PNG/GIF/SVG to PNG or JPEG. A DDS goes through there unchanged.
DOCX and HWPX output:DocxWriter and HwpxWriter turn pictures Word or Hancom can't show into PNG.
3D model textures:TextureForGltf converts textures to PNG for glTF/GLB. Game models often use DDS textures, so this is the case most likely to show up.
The fix is to call DdsChannelOrder.Correct in these places. The texture is read from bytes, not from a file, so DdsChannelOrder gets an overload that checks the header from the bytes. Each path gets a test with a small R8G8B8A8 DDS that checks the colours come out right.
Activity
fix(dds): keep the colours of DDS pictures inside other files