.dds files with palettised image data

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
User avatar
tschumann
beginner
Posts: 22
Joined: Sat Jun 03, 2017 9:35 am
Location: Australia
Has thanked: 2 times
Contact:

.dds files with palettised image data

Post by tschumann » Sat Apr 07, 2018 11:32 pm

Is it possible to store a 256 colour image with palette data in a .dds file? Looking at https://msdn.microsoft.com/en-us/librar ... s.85).aspx is doesn't look like it but it's not explicit either way.

episoder
mega-veteran
mega-veteran
Posts: 186
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 3 times
Been thanked: 80 times

Re: .dds files with palettised image data

Post by episoder » Sat Apr 07, 2018 11:48 pm

yes.
Last edited by episoder on Sat Apr 28, 2018 9:04 pm, edited 1 time in total.

User avatar
tschumann
beginner
Posts: 22
Joined: Sat Jun 03, 2017 9:35 am
Location: Australia
Has thanked: 2 times
Contact:

Re: .dds files with palettised image data

Post by tschumann » Sun Apr 08, 2018 5:02 am

Great thanks - I'm looking to export to a single format ideally (.dds in this case) but it's probably easier to just put palettised data into a .bmp and use .dds for everything else rather than trying to decompress DXTn data to get it into .bmp form as well.

Apollo
veteran
Posts: 130
Joined: Sat Oct 21, 2006 12:58 pm
Has thanked: 5 times
Been thanked: 20 times

Re: .dds files with palettised image data

Post by Apollo » Thu Apr 12, 2018 6:14 am

DDS is just a container for DirectX texture data and actually you can encode 256 color palettised texture DDS with nvidia texture tools (legacy tools atleast work) via photoshop etc.
Of course you can not use any of the DXT compressions then on the data and it will be kept simply as is but I am not sure how such is internally handled but you can sure encode them as single dds files

User avatar
tschumann
beginner
Posts: 22
Joined: Sat Jun 03, 2017 9:35 am
Location: Australia
Has thanked: 2 times
Contact:

Re: .dds files with palettised image data

Post by tschumann » Thu Apr 12, 2018 11:53 am

Yeah but I don't think it's possible to store the raw 256-colour image data in a .dds? From the documentation it looks like you can only store data where each pixel's colour is specified (or data encoded with some sort of DXT compression).

Apollo
veteran
Posts: 130
Joined: Sat Oct 21, 2006 12:58 pm
Has thanked: 5 times
Been thanked: 20 times

Re: .dds files with palettised image data

Post by Apollo » Fri Apr 27, 2018 6:22 pm

I'm not sure what you mean by raw here, but I decided provide encoded example of a wallpaper held as indexed 256-color that you can indeed do this, it stores 256 color palette in the file and rest is indexed data. However not all DDS supporting apps know to open this right unlike Nvidia's dds plugin. If this not clear confusion, not sure what will but like I said, feel free encode and try yourself, but from where I look this, it is doable as far DDS goes. In terms of compression, indexed seems to yield similar size to DXT5 compressed while indexed is in diverse color images bad choice in quality.
You do not have the required permissions to view the files attached to this post.

episoder
mega-veteran
mega-veteran
Posts: 186
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 3 times
Been thanked: 80 times

Re: .dds files with palettised image data

Post by episoder » Sat Apr 28, 2018 9:00 pm

neat info. i shoulda looked that up on microsoft github, not the webpage. it's a pixelformat flag. my standard picture viewer doesn't decode it. gimp and visual studio does tho. nice picture. :]

User avatar
tschumann
beginner
Posts: 22
Joined: Sat Jun 03, 2017 9:35 am
Location: Australia
Has thanked: 2 times
Contact:

Re: .dds files with palettised image data

Post by tschumann » Thu May 03, 2018 11:25 am

Ah interesting.
I tried it out in Paint.net and it didn't like it though.

Post Reply