Page 1 of 1

DDS reader doesn't work correctly with alpha channel

Posted: 2010-02-24T10:59:38-07:00
by einstein973
I have a problem converting a DDS image (pedia_icon_core_flora.dds contained in http://www.ec3hp.de/files/dds.zip) to png. I use ImageMagick-6.5.9-10-Q16-windows-dll on Windows Vista like this:
c:\Program Files\ImageMagick-6.5.9-Q16\convert.exe pedia_icon_core_flora.dds pedia_icon_core_flora.png
The result (which shows heavy artifacts) is in the zip archive as pedia_icon_core_flora BAD.png. The same source file converted with ImageMagick 6.5.4-10 on a Linux PC looks okay, the result is named pedia_icon_core_flora OK.png in the zip archive. Other files (without transparency) work perfectly well on both systems.

Re: DDS reader doesn't work correctly with alpha channel

Posted: 2011-03-21T03:33:25-07:00
by Steeljaw
Bumping this since it still doesn't seem to work with IM-6.6.8-5 for windows. I haven't got access to any other OS to try this out atm.

I am looking to extract the alpha layer of a DDS and get a really jaggedy image like this:
Image

If I do the alpha decomposing in GIMP for example I get the following image:
Image

The difference is that I in GIMP tell it not to import the diferent mipmaps, could it be that the DDS-reader in IM grabs all of the mipmaps in the DDS as well? And how can I make it to only read the highest resolution one, if that is the case?

Re: DDS reader doesn't work correctly with alpha channel

Posted: 2011-03-21T06:04:23-07:00
by magick
Post a URL to your image. We need to download and reproduce the problem before we can comment.

Re: DDS reader doesn't work correctly with alpha channel

Posted: 2011-03-21T06:22:00-07:00
by Steeljaw
I am using this DDS,
http://guslin.com/ac4_tex_ngs.dds

I am running the following commands to extract and rearrange the color channels:

convert ac4_tex_ngs.dds -channel ag -separate temp_ngs.png
convert temp_ngs-0.png temp_ngs-1.png -channel gr -combine normal_map.png

It's only the alpha channel that seems affected by the pixelation though, the green channel I also extract is fine!

Re: DDS reader doesn't work correctly with alpha channel

Posted: 2011-04-30T01:29:01-07:00
by Steeljaw
Bump.

Any news in this matter?

Re: DDS reader doesn't work correctly with alpha channel

Posted: 2011-04-30T09:57:59-07:00
by fmw42
I extracted the alpha channel on IM 6.6.9.6 Q16 Mac OSX Tiger and it looks fine - the same as your GIMP extraction.

convert ac4_tex_ngs.dds -alpha extract ac4_tex_ngs_alpha.png

or

convert ac4_tex_ngs.dds -channel a -separate ac4_tex_ngs.dds_alpha.png

Note that PNG has been under development and improvement over many releases. I suspect that you just need to upgrade your IM or use a different format to save the extracted alpha channel.

Re: DDS reader doesn't work correctly with alpha channel

Posted: 2011-05-02T01:30:21-07:00
by Steeljaw
I'll have to try that on my Mac when I get home.

With the latest available version (6.6.9-7) I still see the artifacts in both 32 and 64bit versions for windows no matter whether I convert to png, jpg or tiff.

The RGB channels are however unaffected by these artifacts.

edit: Just built from svn on ubuntu 11.04 and there are no artifacts to be seen! So this is then a windows build bug?