[SOLVED] Load .DDS images into Love

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
jaschutte
Prole
Posts: 3
Joined: Sat Jun 29, 2019 12:43 pm

[SOLVED] Load .DDS images into Love

Post by jaschutte »

Hello everyone! I hope you're having a nice day! I've been using love2d for quite a while now and decided to make a little editor to help my friends out. I wanted to user to be able to load .dds files into the editor and the image would show up. Everything works except for the loading of the .dds file. It says it's unsupported. I tried to search for a solution but I couldn't find any. I did find that it was possible in 0.9 but is it still possible to do it in 11.2. Any help is appreciated! :)

Lua & love versions + the error code

Code: Select all

LUA VERSION:    Lua 5.1
LOVE VERSION:   11      2       0       Mysterious Mysteries
Is Compressed?  false
Error: main.lua:533: Could not decode file 'goals/focus_AST_never_gallipoli.dds' to ImageData: unsupported file format
stack traceback:
        [string "boot.lua"]:637: in function <[string "boot.lua"]:633>
        [C]: in function 'newImageData'
        main.lua:533: in main chunk
        [C]: in function 'require'
        [string "boot.lua"]:475: in function <[string "boot.lua"]:311>
        [C]: in function 'xpcall'
        [string "boot.lua"]:645: in function <[string "boot.lua"]:639>
        [C]: in function 'xpcall'
Last edited by jaschutte on Sat Jun 29, 2019 1:46 pm, edited 1 time in total.
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Load .DDS images into Love

Post by slime »

Do you know what sort of format the .dds file contains? love currently can load compressed textures from dds files (DXT1, DXT5, BC7, etc. formats), but it can't load raw RGBA bytes stored in a .dds container.
jaschutte
Prole
Posts: 3
Joined: Sat Jun 29, 2019 12:43 pm

Re: Load .DDS images into Love

Post by jaschutte »

slime wrote: Sat Jun 29, 2019 1:31 pm Do you know what sort of format the .dds file contains? love currently can load compressed textures from dds files (DXT1, DXT5, BC7, etc. formats), but it can't load raw RGBA bytes stored in a .dds container.
I'm not sure how to check sorry, I can give you the file tho.
The file wasn't compressed I know that for sure tho.
https://cdn.discordapp.com/attachments/ ... lipoli.dds

Edit: I just tested it with DXT5 compression and it worked so I'll just compress all of the files, thanks for the help!
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 4 guests