Mercurial > hg > dmlib
comparison tools/libgfx.c @ 2212:2edd3f2ddee2
Force non-planar for PPM output.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 14 Jun 2019 05:58:30 +0300 |
parents | ef9b55c879d6 |
children | 8cd2a821e8a0 |
comparison
equal
deleted
inserted
replaced
2211:ef9b55c879d6 | 2212:2edd3f2ddee2 |
---|---|
883 { | 883 { |
884 return dmError(DMERR_NOT_SUPPORTED, | 884 return dmError(DMERR_NOT_SUPPORTED, |
885 "Conversion of non-indexed image to indexed not supported yet.\n"); | 885 "Conversion of non-indexed image to indexed not supported yet.\n"); |
886 } | 886 } |
887 | 887 |
888 // Force non-planar etc | |
888 memcpy(&tmpSpec, spec, sizeof(DMImageWriteSpec)); | 889 memcpy(&tmpSpec, spec, sizeof(DMImageWriteSpec)); |
889 | 890 tmpSpec.planar = FALSE; |
890 switch (spec->pixfmt) | 891 |
892 switch (tmpSpec.pixfmt) | |
891 { | 893 { |
892 case DM_PIXFMT_RGB: | 894 case DM_PIXFMT_RGB: |
893 case DM_PIXFMT_RGBA: | 895 case DM_PIXFMT_RGBA: |
894 case DM_PIXFMT_PALETTE: | 896 case DM_PIXFMT_PALETTE: |
895 tmpSpec.pixfmt = DM_PIXFMT_RGB; | 897 tmpSpec.pixfmt = DM_PIXFMT_RGB; |