Mercurial > hg > dmlib
comparison tools/libgfx.c @ 2095:80786a28caf0
Mark image format flags with the color formats they support.
This information is not yet used.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 05 Mar 2019 09:57:32 +0200 |
parents | 4276b8c0fef0 |
children | 6b2bac1e3445 |
comparison
equal
deleted
inserted
replaced
2094:4276b8c0fef0 | 2095:80786a28caf0 |
---|---|
2743 const DMImageFormat dmImageFormatList[] = | 2743 const DMImageFormat dmImageFormatList[] = |
2744 { | 2744 { |
2745 #ifdef DM_USE_LIBPNG | 2745 #ifdef DM_USE_LIBPNG |
2746 { | 2746 { |
2747 "png", "Portable Network Graphics", | 2747 "png", "Portable Network Graphics", |
2748 DM_IMGFMT_PNG, DM_FMT_RDWR, | 2748 DM_IMGFMT_PNG, DM_FMT_RDWR | DM_COLFMT_ANY, |
2749 fmtProbePNG, dmReadPNGImage, dmWritePNGImage, | 2749 fmtProbePNG, dmReadPNGImage, dmWritePNGImage, |
2750 }, | 2750 }, |
2751 #endif | 2751 #endif |
2752 { | 2752 { |
2753 "ppm", "Portable PixMap", | 2753 "ppm", "Portable PixMap", |
2754 DM_IMGFMT_PPM, DM_FMT_RDWR, | 2754 DM_IMGFMT_PPM, DM_FMT_RDWR | DM_COLFMT_GRAYSCALE | DM_COLFMT_RGB, |
2755 fmtProbePPM, dmReadPPMImage, dmWritePPMImage, | 2755 fmtProbePPM, dmReadPPMImage, dmWritePPMImage, |
2756 }, | 2756 }, |
2757 { | 2757 { |
2758 "pcx", "Z-Soft Paintbrush", | 2758 "pcx", "Z-Soft Paintbrush", |
2759 DM_IMGFMT_PCX, DM_FMT_RDWR, | 2759 DM_IMGFMT_PCX, DM_FMT_RDWR | DM_COLFMT_PALETTE | DM_COLFMT_RGB, |
2760 fmtProbePCX, dmReadPCXImage, dmWritePCXImage, | 2760 fmtProbePCX, dmReadPCXImage, dmWritePCXImage, |
2761 }, | 2761 }, |
2762 { | 2762 { |
2763 "ilbm", "IFF ILBM (interleaved/old DP2)", | 2763 "ilbm", "IFF ILBM (interleaved/old DP2)", |
2764 DM_IMGFMT_IFF_ILBM, DM_FMT_RDWR, | 2764 DM_IMGFMT_IFF_ILBM, DM_FMT_RDWR | DM_COLFMT_PALETTE, |
2765 fmtProbeIFF_ILBM, dmReadIFFImage, dmWriteIFFImage, | 2765 fmtProbeIFF_ILBM, dmReadIFFImage, dmWriteIFFImage, |
2766 }, | 2766 }, |
2767 { | 2767 { |
2768 "pbm", "IFF PBM (DP2e)", | 2768 "pbm", "IFF PBM (DP2e)", |
2769 DM_IMGFMT_IFF_PBM, DM_FMT_RDWR, | 2769 DM_IMGFMT_IFF_PBM, DM_FMT_RDWR | DM_COLFMT_PALETTE, |
2770 fmtProbeIFF_PBM, dmReadIFFImage, dmWriteIFFImage, | 2770 fmtProbeIFF_PBM, dmReadIFFImage, dmWriteIFFImage, |
2771 }, | 2771 }, |
2772 { | 2772 { |
2773 "acbm", "IFF ACBM (Amiga Basic)", | 2773 "acbm", "IFF ACBM (Amiga Basic)", |
2774 DM_IMGFMT_IFF_ACBM, DM_FMT_RDWR, | 2774 DM_IMGFMT_IFF_ACBM, DM_FMT_RDWR | DM_COLFMT_PALETTE, |
2775 fmtProbeIFF_ACBM, dmReadIFFImage, dmWriteIFFImage, | 2775 fmtProbeIFF_ACBM, dmReadIFFImage, dmWriteIFFImage, |
2776 }, | 2776 }, |
2777 { | 2777 { |
2778 "raw", "Plain bitplaned (planar or non-planar) RAW", | 2778 "raw", "Plain bitplaned (planar or non-planar) RAW", |
2779 DM_IMGFMT_RAW, DM_FMT_WR, | 2779 DM_IMGFMT_RAW, DM_FMT_WR | DM_COLFMT_PALETTE, |
2780 NULL, NULL, dmWriteRAWImage, | 2780 NULL, NULL, dmWriteRAWImage, |
2781 }, | 2781 }, |
2782 { | 2782 { |
2783 "araw", "IFFMaster Amiga RAW", | 2783 "araw", "IFFMaster Amiga RAW", |
2784 DM_IMGFMT_ARAW, DM_FMT_WR, | 2784 DM_IMGFMT_ARAW, DM_FMT_WR | DM_COLFMT_PALETTE, |
2785 NULL, NULL, dmWriteRAWImage, | 2785 NULL, NULL, dmWriteRAWImage, |
2786 }, | 2786 }, |
2787 { | 2787 { |
2788 "cdump", "'C' dump (image data only)", | 2788 "cdump", "'C' dump (image data only)", |
2789 DM_IMGFMT_CDUMP, DM_FMT_WR, | 2789 DM_IMGFMT_CDUMP, DM_FMT_WR | DM_COLFMT_ANY, |
2790 NULL, NULL, dmWriteCDumpImage, | 2790 NULL, NULL, dmWriteCDumpImage, |
2791 } | 2791 } |
2792 }; | 2792 }; |
2793 | 2793 |
2794 const int ndmImageFormatList = sizeof(dmImageFormatList) / sizeof(dmImageFormatList[0]); | 2794 const int ndmImageFormatList = sizeof(dmImageFormatList) / sizeof(dmImageFormatList[0]); |