Important information: this site is currently scheduled to go offline indefinitely by end of the year.

.dds files with palettised image data

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

.dds files with palettised image data

Post by tschumann »

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: 162
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 6 times
Been thanked: 78 times

Re: .dds files with palettised image data

Post by episoder »

yes.
Last edited by episoder on Sat Apr 28, 2018 9:04 pm, edited 1 time in total.
User avatar
tschumann
advanced
Posts: 57
Joined: Sat Jun 03, 2017 9:35 am
Location: Australia
Has thanked: 7 times
Been thanked: 4 times
Contact:

Re: .dds files with palettised image data

Post by tschumann »

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: 145
Joined: Sat Oct 21, 2006 12:58 pm
Has thanked: 5 times
Been thanked: 24 times

Re: .dds files with palettised image data

Post by Apollo »

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
advanced
Posts: 57
Joined: Sat Jun 03, 2017 9:35 am
Location: Australia
Has thanked: 7 times
Been thanked: 4 times
Contact:

Re: .dds files with palettised image data

Post by tschumann »

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: 145
Joined: Sat Oct 21, 2006 12:58 pm
Has thanked: 5 times
Been thanked: 24 times

Re: .dds files with palettised image data

Post by Apollo »

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: 162
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 6 times
Been thanked: 78 times

Re: .dds files with palettised image data

Post by episoder »

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
advanced
Posts: 57
Joined: Sat Jun 03, 2017 9:35 am
Location: Australia
Has thanked: 7 times
Been thanked: 4 times
Contact:

Re: .dds files with palettised image data

Post by tschumann »

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