Skip to content

Commit 8d3aa19

Browse files
committed
enable jpg/tif/bmp reading in DDStool on win/osx (linux always had it), add Xgrinder autoconfig
1 parent c31ed76 commit 8d3aa19

13 files changed

+7
-4
lines changed

src/XPTools/DDSTool.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@ int main(int argc, char * argv[])
383383
if (argc == 2 && strcmp(argv[1],"--auto_config")==0)
384384
{
385385
printf("CMD .png .dds \"%s\" DDS_MODE HAS_MIPS PVR_SCALE \"INFILE\" \"OUTFILE\"\n",argv[0]);
386+
printf("CMD .jpg .dds \"%s\" DDS_MODE HAS_MIPS PVR_SCALE \"INFILE\" \"OUTFILE\"\n", argv[0]);
387+
printf("CMD .tif .dds \"%s\" DDS_MODE HAS_MIPS PVR_SCALE \"INFILE\" \"OUTFILE\"\n", argv[0]);
388+
printf("CMD .bmp .dds \"%s\" DDS_MODE HAS_MIPS PVR_SCALE \"INFILE\" \"OUTFILE\"\n", argv[0]);
386389
printf("OPTIONS DDSTool\n");
387390
printf("RADIO DDS_MODE 1 --png2dxt Auto-pick compression\n");
388391
printf("RADIO DDS_MODE 0 --png2dxt1 BC1/DXT1 Compression (1-bit alpha)\n");
@@ -467,7 +470,7 @@ int main(int argc, char * argv[])
467470
bool one_file = false;
468471

469472
if(strcmp(argv[n],"--one_file")==0) { ++n; one_file = true; }
470-
if(CreateBitmapFromPNG(argv[n], &info, true, GAMMA_SRGB))
473+
if(LoadBitmapFromAnyFile(argv[n], &info))
471474
{
472475
printf("Unable to open png file %s\n", argv[n]);
473476
return 1;
@@ -680,7 +683,7 @@ int main(int argc, char * argv[])
680683
}
681684

682685
ImageInfo info;
683-
if (CreateBitmapFromPNG(argv[arg_base], &info, bc_type == 0, GAMMA_SRGB))
686+
if (LoadBitmapFromAnyFile(argv[arg_base], &info))
684687
{
685688
printf("Unable to open png file %s\n", argv[arg_base]);
686689
return 1;

src/XPTools/version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
#define XPT_PACKAGE_VER "24-5"
99

10-
#define DDSTOOL_VER 10200
11-
#define DDSTOOL_EXTRAVER "-11"
10+
#define DDSTOOL_VER 10300
11+
#define DDSTOOL_EXTRAVER "-b1"
1212

1313
#define DSFTOOL_VER 20400
1414
#define DSFTOOL_EXTRAVER "-b1"

test/img_reading/stbarts_argb.bmp

4 MB
Binary file not shown.

test/img_reading/stbarts_rgb.bmp

3 MB
Binary file not shown.

test/img_reading/stbarts_rgb.jpg

713 KB
Loading

test/img_reading/stbarts_rgb.png

6.54 MB
Loading
7.67 MB
Binary file not shown.

test/img_reading/stbarts_rgba.png

6.22 MB
Loading

test/img_reading/stbarts_rgba16.png

6.21 MB
Loading
6.05 MB
Binary file not shown.
7.99 MB
Binary file not shown.

test/img_reading/stbarts_rgba_jpg.tif

1.81 MB
Binary file not shown.

test/img_reading/stbarts_rgba_lzw.tif

8.92 MB
Binary file not shown.

0 commit comments

Comments
 (0)