comparison tools/gfxconv.c @ 2516:5fcc9f7b8ad8

Change dmC64DecodeBMP() probeOffs and dataOffs to ssize_t, and use default values if negative values are provided. Also implement support for load-addressless formats.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 12 May 2020 20:27:00 +0300
parents a40de347fcb0
children f3be70c19ce9
comparison
equal deleted inserted replaced
2515:a40de347fcb0 2516:5fcc9f7b8ad8
2768 forced->name, forced->format->mode, forced->fext); 2768 forced->name, forced->format->mode, forced->fext);
2769 } 2769 }
2770 2770
2771 res = dmC64DecodeBMP(&inC64Image, 2771 res = dmC64DecodeBMP(&inC64Image,
2772 dmGrowBufConstCreateFrom(&tbuf, dataBuf, dataSize), 2772 dmGrowBufConstCreateFrom(&tbuf, dataBuf, dataSize),
2773 0, 2, &inC64Fmt, forced); 2773 -1, -1, &inC64Fmt, forced);
2774 2774
2775 if (forced == NULL && inC64Fmt != NULL && res == DMERR_OK) 2775 if (forced == NULL && inC64Fmt != NULL && res == DMERR_OK)
2776 { 2776 {
2777 dmMsg(1, "Probed '%s' format image, type %d, %s\n", 2777 dmMsg(1, "Probed '%s' format image, type %d, %s\n",
2778 inC64Fmt->name, inC64Fmt->format->mode, inC64Fmt->fext); 2778 inC64Fmt->name, inC64Fmt->format->mode, inC64Fmt->fext);