{"id":18003818,"url":"https://github.com/spnda/dds_image","last_synced_at":"2025-08-12T13:06:51.324Z","repository":{"id":117483311,"uuid":"418700605","full_name":"spnda/dds_image","owner":"spnda","description":"Header-only C++11/C++17 DirectDraw Surface (DDS) decoder with Vulkan helpers.","archived":false,"fork":false,"pushed_at":"2024-05-27T10:15:07.000Z","size":28,"stargazers_count":21,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-07T07:42:08.649Z","etag":null,"topics":["cpp","cpp11","cpp17","dds","dds-loader","directdraw-surface","header-only","vulkan"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spnda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-18T23:24:29.000Z","updated_at":"2025-03-26T01:50:59.000Z","dependencies_parsed_at":"2024-03-26T21:30:33.802Z","dependency_job_id":"e5178376-8cfd-4004-8afb-97a2c960e87c","html_url":"https://github.com/spnda/dds_image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spnda/dds_image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spnda%2Fdds_image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spnda%2Fdds_image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spnda%2Fdds_image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spnda%2Fdds_image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spnda","download_url":"https://codeload.github.com/spnda/dds_image/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spnda%2Fdds_image/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270065430,"owners_count":24520946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp11","cpp17","dds","dds-loader","directdraw-surface","header-only","vulkan"],"created_at":"2024-10-30T00:12:14.516Z","updated_at":"2025-08-12T13:06:51.295Z","avatar_url":"https://github.com/spnda.png","language":"C++","readme":"# dds_image\n\nA C++11 single-header DDS (DirectDraw Surface) image library,\nwith no dependencies.\nIt also includes utilities to work with Vulkan, as well\nas optional support for C++17 and C++20 specific features.\nYou can quickly add this as a submodule and add the header files,\nor import it as a subdirectory in CMake.\n\n### Example\n\n```cpp\n#include \u003cdds.hpp\u003e\n\ndds::Image image;\ndds::readFile(\"example.dds\", \u0026image);\n```\n\nOn MSVC you might need to build with `/Zc:__cplusplus` for the built-in C++17 features to work.\nYou can then optionally also define `DDS_USE_STD_FILESYSTEM`, which will make `dds::readFile` accept\na `std::filesystem::path` instead.\n\nEach mipmap can be accessed through `image.mipmaps`. A mipmap is a `dds::span` which represents a\ncontiguous block of memory within the image data that represents the specific mipmap. All mipmaps\nuse the same format and the mipmaps are arranged in order of size in the vector, meaning the\nlargest mipmap is `image.mipmaps.front()` and every next mipmap is exactly 50% smaller.\n\n### Vulkan Usage\n\nIf you want to use the built-in Vulkan features, you **have** to include\nthe Vulkan header before you import this library.\nTo create the VkImage and VkImageView you can use the following two functions.\nNote that you still need to set some fields yourself, most notably `VkImageCreateInfo::usage`,\n`VkImageCreateInfo::samples` and `VkImageViewCreateInfo::image`.\n\n```cpp\n#include \u003cvulkan/vulkan.h\u003e // Before!\n#include \u003cdds.hpp\u003e\n```\n```cpp\n// Optional, for own usage.\nVkImageFormat imageFormat = dds::getVulkanFormat(image.format, image.supportsAlpha);\n\n// Will automatically fill VkImageCreateInfo::format with a separate call to dds::getVulkanFormat.\nVkImageCreateInfo imageCreateInfo = dds::getVulkanImageCreateInfo(\u0026image);\nVkImageViewCreateInfo imageViewCreateInfo = dds::getVulkanImageViewCreateInfo(\u0026image);\n```\n\n### License\n\nThe library itself is licensed under MIT.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspnda%2Fdds_image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspnda%2Fdds_image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspnda%2Fdds_image/lists"}