mirror of
https://github.com/joel16/VITAlbum.git
synced 2024-11-23 11:39:47 +00:00
Add PSD support
This commit is contained in:
parent
a0d2ac847a
commit
1eb1d7727b
@ -11,6 +11,7 @@ A simple homebrew file browser that is used for viewing various image formats on
|
||||
- PCX
|
||||
- PNG
|
||||
- PGM/PPM
|
||||
- PSD
|
||||
- TGA
|
||||
- TIFF
|
||||
- WEBP
|
||||
|
@ -142,7 +142,8 @@ namespace GUI {
|
||||
std::string ext = FS::GetFileExt(filename);
|
||||
|
||||
if ((ext == ".BMP") || (ext == ".GIF") || (ext == ".ICO") || (ext == ".JPG") || (ext == ".JPEG") || (ext == ".PCX")
|
||||
|| (ext == ".PNG") || (ext == ".PGM") || (ext == ".PPM") || (ext == ".TGA") || (ext == ".TIFF") || (ext == ".WEBP"))
|
||||
|| (ext == ".PNG") || (ext == ".PGM") || (ext == ".PPM") || (ext == ".PSD") || (ext == ".TGA") || (ext == ".TIFF")
|
||||
|| (ext == ".WEBP"))
|
||||
ImGui::Image((void *)(intptr_t)image_texture.id, ImVec2(image_texture.width, image_texture.height));
|
||||
else
|
||||
ImGui::Image((void *)(intptr_t)file_texture.id, ImVec2(file_texture.width, file_texture.height));
|
||||
@ -169,7 +170,7 @@ namespace GUI {
|
||||
gui_state = GUI_STATE_IMAGE_PREVIEW;
|
||||
}
|
||||
else if ((ext == ".JPG") || (ext == ".JPEG") || (ext == ".PNG") || (ext == ".PGM") || (ext == ".PPM")
|
||||
|| (ext == ".TGA")) {
|
||||
|| (ext == ".PSD") || (ext == ".TGA")) {
|
||||
SceBool image_ret = Textures::LoadImageFile(path, &texture);
|
||||
IM_ASSERT(image_ret);
|
||||
gui_state = GUI_STATE_IMAGE_PREVIEW;
|
||||
|
@ -16,10 +16,10 @@
|
||||
#define STBI_NO_GIF
|
||||
#define STBI_NO_HDR
|
||||
#define STBI_NO_PIC
|
||||
#define STBI_NO_PSD
|
||||
#define STBI_ONLY_JPEG
|
||||
#define STBI_ONLY_PNG
|
||||
#define STBI_ONLY_PNM
|
||||
#define STBI_ONLY_PSD
|
||||
#define STBI_ONLY_TGA
|
||||
#include "stb_image.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user