mirror of
https://github.com/bitbank2/image_to_c.git
synced 2025-11-04 14:49:59 +08:00
Update main.c
This commit is contained in:
parent
9011a73adc
commit
78b0febe6b
3
main.c
3
main.c
@ -680,11 +680,12 @@ int main(int argc, char *argv[])
|
|||||||
p = (unsigned char *)malloc(0x10000); // allocate 64k to play with
|
p = (unsigned char *)malloc(0x10000); // allocate 64k to play with
|
||||||
GetLeafName(argv[iStart], szLeaf);
|
GetLeafName(argv[iStart], szLeaf);
|
||||||
printf("// Created with image_to_c\n// https://github.com/bitbank2/image_to_c\n");
|
printf("// Created with image_to_c\n// https://github.com/bitbank2/image_to_c\n");
|
||||||
if (bStrip) {
|
if (bStrip && iDataOff != iDataSize) {
|
||||||
iStart = iDataOff;
|
iStart = iDataOff;
|
||||||
printf("//\n// This hex data is only the image; the header + metadata has been removed\n");
|
printf("//\n// This hex data is only the image; the header + metadata has been removed\n");
|
||||||
printf("// %s\n// File size = %d bytes, this data = %d bytes\n//\n", szLeaf, iSize, iDataSize);
|
printf("// %s\n// File size = %d bytes, this data = %d bytes\n//\n", szLeaf, iSize, iDataSize);
|
||||||
} else {
|
} else {
|
||||||
|
bStrip = 0; // disable stripping if not possible to use it
|
||||||
printf("//\n// %s\n// Data size = %d bytes\n//\n", szLeaf, iSize); // comment header with filename
|
printf("//\n// %s\n// Data size = %d bytes\n//\n", szLeaf, iSize); // comment header with filename
|
||||||
}
|
}
|
||||||
if (szInfo[0])
|
if (szInfo[0])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user