Writing DDS image format has major errors

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

Moderators: helmut, XnTriq, xnview

Post Reply
User avatar
rra
Posts: 192
Joined: Thu May 11, 2006 1:46 pm
Location: The Netherlands

Writing DDS image format has major errors

Post by rra »

the latest version can read DDS (type DXT1) OK , but saving the same image
in DDS DXT1 format gets data (colors) all scrambled up.

Not sure about other DDS types, anyone ??

René

V1.90 <x>
User avatar
xnview
Author of XnView
Posts: 46238
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: writing DDS image format has major errors

Post by xnview »

rra wrote:the latest version can read DDS (type DXT1) OK , but saving the same image
in DDS DXT1 format gets data (colors) all scrambled up.

Not sure about other DDS types, anyone ??
Really, i have no problem. Could you send me original file?
Pierre.
User avatar
rra
Posts: 192
Joined: Thu May 11, 2006 1:46 pm
Location: The Netherlands

Post by rra »

The file is rather big , 16384 x 8192 x 32 bit,
all together something like 87 MB.
I will rar the file (compressed to 28 MB) and put it on my
personal webspace.
Alternatively I can also look for a smaller file with the same problem.

its URL is:


http://members.home.nl/ramekers/Earth.rar .

Just reading the file with XnView and saving it back as the same type
with different name, and reading the copy back will show what went wrong.

If you have trouble obtaining the file send me a message.

Thanks ,

René
User avatar
xnview
Author of XnView
Posts: 46238
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

rra wrote:The file is rather big , 16384 x 8192 x 32 bit,
all together something like 87 MB.
I will rar the file (compressed to 28 MB) and put it on my
personal webspace.
Alternatively I can also look for a smaller file with the same problem.

its URL is:


http://members.home.nl/ramekers/Earth.rar .

Just reading the file with XnView and saving it back as the same type
with different name, and reading the copy back will show what went wrong.

If you have trouble obtaining the file send me a message.

Thanks ,

René
Do you have a smaller file??
Pierre.
User avatar
rra
Posts: 192
Joined: Thu May 11, 2006 1:46 pm
Location: The Netherlands

Post by rra »

Yes , this one is "only" 8 MB, problem is the same is te bigger one:


http://members.home.nl/ramekers/Earth8k.zip


René
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France
Contact:

Post by Olivier_G »

Samples are not available anymore.

I tried saving in DDS format and got the right colors/images (dimensions are 2^n only, but that seems to be a characteristics of the format itself).
Olivier
User avatar
rra
Posts: 192
Joined: Thu May 11, 2006 1:46 pm
Location: The Netherlands

Post by rra »

I have placed a similar DDS texture on my website,
it is rarred to conserve space.


http://members.home.nl/ramekers/Earth8k.rar


Just resize the original 8K DDS file (50% for example), save it into DDS format, and reload the smaller DDS file again !!


René Ramekers[/img]
User avatar
xnview
Author of XnView
Posts: 46238
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

rra wrote:I have placed a similar DDS texture on my website,
it is rarred to conserve space.


http://members.home.nl/ramekers/Earth8k.rar


Just resize the original 8K DDS file (50% for example), save it into DDS format, and reload the smaller DDS file again !!


René Ramekers[/img]
Yes, but currently i don't find this bug...
Pierre.
User avatar
rra
Posts: 192
Joined: Thu May 11, 2006 1:46 pm
Location: The Netherlands

Post by rra »

Pierre, are you saying the bug is fixed ??
What version (beta ??) are you referring to ?
I tried it with beta 5 I believe .

René
User avatar
xnview
Author of XnView
Posts: 46238
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

rra wrote:Pierre, are you saying the bug is fixed ??
What version (beta ??) are you referring to ?
I tried it with beta 5 I believe .

René
No, i don't find how to fix it....
Pierre.
eyebex
Posts: 32
Joined: Thu Jul 29, 2004 8:11 pm

Post by eyebex »

I can confirm the bug "rra" described (using beta 5). Here's what I did exactly:

- Open the DDS by double-clicking on it (if needed, you need to associate it with XnView first).

- Resize the image to 50% with "Keep ratio" and "Lanczos" checked.

- "Save as..." the image under a different name.

- Close XnView.

- Open the new image by double-clicking on it.

Here's how the broken new image looks like:
http://www.tu-bs.de/~y0011326/Earth8k_resized.png

EDIT: In case you've written the DDS / DXT (de-)compression code yourself, I can recommend to use squish instead.
Post Reply