Save corruption on specific dds files

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: helmut, XnTriq, xnview

Posts: 1
Joined: Sun May 07, 2017 2:26 am

Save corruption on specific dds files

Post by ytrfamli »


I noticed XnView had issues with specific dds files from a game when I tried to save them as the same format (no change to extension) -- the image became wider and taller in exact powers of 2 (for example, a file of 1108x92 becomes 2048x128 in dimension) , and there's visible loss of information at the extra parts. (mostly the image repeats to the right, it does not add extra pixels vertically other than space)

Initially I thought it's just the game's problem (maybe its files doesn't conform to standards), but after more experiments it is evident that for some reason, XnView just doesn't handle these specific dds files correctly, for:
1. This doesn't happen on other dds files from the same game.
2. If I convert the dds file in question to other formats first, say, PNG, nothing goes wrong, but when I proceed to convert the PNG again to dds, the corruption surfaces.
3.Once the corruption is in place, saving/resaving does not further corrupt the image - there is likely something irregular in the dds, that persist so long as XnView does not save as dds on it's own. Once XnView saves it, the irregularity is fixed albeit not correctly.


Short Description: XnView has some problems handling save to dds format
To Reproduce : Open the attached dds, simply save it again as dds.
Attachment content : - dds file in question. - another dds file in question. Note this is an entirely different file from the game, not a horizontal flip of the previous. - Sample of what a corruption looks like
XnView Version: 2.40 Classic (Apr 18 2017)

You do not have the required permissions to view the files attached to this post.
User avatar
Author of XnView
Posts: 37892
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Save corruption on specific dds files

Post by xnview »

a known issue, DDS output can only be with power of 2 for dimensions...