Mercurial > hg > dmlib
diff tools/gfxconv.c @ 810:cbe263ad963c
Some work on charset conversion.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 15 May 2014 02:05:53 +0300 |
parents | 1e4d88fbce19 |
children | 5753d7f24106 |
line wrap: on
line diff
--- a/tools/gfxconv.c Wed May 14 21:28:14 2014 +0300 +++ b/tools/gfxconv.c Thu May 15 02:05:53 2014 +0300 @@ -1618,14 +1618,14 @@ if (optOutFilename == NULL) { - dmError("Output filename not set, required for image formats.\n"); + dmError("Output filename not set, required for bitmap formats.\n"); goto error; } switch (optOutFormat) { case FFMT_IMAGE: - res = dmC64ConvertBMP2Image(&outImage, &cimage, cfmt, TRUE); + res = dmC64ConvertBMP2Image(&outImage, &cimage, cfmt, FALSE); if (res != DMERR_OK || outImage == NULL) { @@ -1643,6 +1643,14 @@ case FFMT_CHAR: case FFMT_SPRITE: + res = dmC64ConvertBMP2Image(&outImage, &cimage, cfmt, TRUE); + + if (res != DMERR_OK || outImage == NULL) + { + dmError("Error in bitmap to template image conversion.\n"); + goto error; + } + res = dmWriteSpritesAndChars(optOutFilename, outImage, optOutFormat, optInMulticolor); break;