Skip to content

Commit 6728f5b

Browse files
committed
Add support for DDS files
Current supported DDS formats are in parity with Python Pillow
1 parent efd55a1 commit 6728f5b

11 files changed

+1684
-2
lines changed

src/JPEGView/BcnDecode.cpp

Lines changed: 960 additions & 0 deletions
Large diffs are not rendered by default.

src/JPEGView/BcnDecode.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
*
3+
*
4+
*/
5+
6+
#pragma once
7+
8+
#include <cstdint>
9+
10+
typedef struct DecodeState {
11+
int xsize; // Width
12+
int ysize; // Height
13+
int xoff; // X Offset
14+
int yoff; // Y Offset
15+
16+
int ystep = 0;
17+
18+
int n; // BCN format
19+
char* pixel_format;
20+
int inNumChannels;
21+
int outNumChannels;
22+
int bytesPerBlock;
23+
24+
int x; // Current x position
25+
int y; // Current y position
26+
} DecodeState;
27+
28+
int ImagingBcnDecode(const uint8_t* src, uint8_t* dst, DecodeState *state, uint32_t bytes);

0 commit comments

Comments
 (0)