comparison tools/gfxconv.c @ 2497:ea5929b04a26

Oooops, forgot to commit these changes to color remapping stuff. 100L.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 28 Apr 2020 20:58:55 +0300
parents 6a6ed3eeded5
children 2e38e1512a22
comparison
equal deleted inserted replaced
2496:6a6ed3eeded5 2497:ea5929b04a26
2034 image->pal = tpal; 2034 image->pal = tpal;
2035 } 2035 }
2036 break; 2036 break;
2037 2037
2038 case REMAP_MAPPED: 2038 case REMAP_MAPPED:
2039 if ((res = dmMapImageColors(&image, pimage, 2039 if ((res = dmMapImageColors(
2040 optRemapTable, optNRemapTable, optRemapRemove)) != DMERR_OK) 2040 &image, pimage, optRemapTable, optNRemapTable,
2041 optRemapMaxDist, optRemapNoMatchColor,
2042 optRemapMatchAlpha, optRemapRemove)) != DMERR_OK)
2041 goto out; 2043 goto out;
2044
2042 allocated = TRUE; 2045 allocated = TRUE;
2043 break; 2046 break;
2044 2047
2045 case REMAP_AUTO: 2048 case REMAP_AUTO:
2046 if (optPaletteData == NULL) 2049 if (optPaletteData == NULL)
2048 dmErrorMsg( 2051 dmErrorMsg(
2049 "Color auto-remapping requested, but target palette not set? (-p option)\n"); 2052 "Color auto-remapping requested, but target palette not set? (-p option)\n");
2050 goto out; 2053 goto out;
2051 } 2054 }
2052 2055
2053 if ((res = dmRemapImageColors(&image, pimage, 2056 if ((res = dmRemapImageColors(
2054 optPaletteData, optRemapMatchAlpha, 2057 &image, pimage, optPaletteData,
2055 optRemapMaxDist, optRemapNoMatchColor, 2058 optRemapMaxDist, optRemapNoMatchColor,
2056 optRemapRemove)) != DMERR_OK) 2059 optRemapMatchAlpha, optRemapRemove)) != DMERR_OK)
2057 goto out; 2060 goto out;
2058 2061
2059 allocated = TRUE; 2062 allocated = TRUE;
2060 break; 2063 break;
2061 } 2064 }