Workaround for upstream MagickWand bug
This commit is contained in:
26
main.c
26
main.c
@@ -293,6 +293,11 @@ int main(const int argc, char *argv[]) {
|
||||
|
||||
MagickWriteImage(chunk, framename);
|
||||
|
||||
char* command = (char*)malloc(512); // lazy hack until magickwand is fixed
|
||||
sprintf(command, "mogrify -depth 8 -define bmp:format=bmp3 -type palette -compress none %s", framename);
|
||||
system(command);
|
||||
free(command);
|
||||
|
||||
iw++;
|
||||
}
|
||||
ih++;
|
||||
@@ -312,7 +317,26 @@ int main(const int argc, char *argv[]) {
|
||||
sprintf(command, "./compimg.exe -ace -c%d -r0 -pt%s -emov -M%s +segments.txt", opt.c+1, argTransparent, filename);
|
||||
#endif
|
||||
printf("%s\n", command);
|
||||
if (system(command)) { printf("ERROR trying to run COMPIMG!\n"); return 0; }
|
||||
if (system(command)) { printf("ERROR trying to run COMPIMG!\nMake sure that COMPIMG.EXE is inside of the folder you are working in.\n"); return 0; }
|
||||
|
||||
printf("Cleaning up temporary files...\n");
|
||||
|
||||
while (i < numFrames) {
|
||||
int ih = 0;
|
||||
while (ih < piecesY) {
|
||||
int iw = 0;
|
||||
while (iw < piecesX) {
|
||||
char* framename = (char*)malloc(12 * piecesX * piecesY * sizeof(char)); // MSVC
|
||||
sprintf(framename, "f%d%d%d.bmp", i, iw, ih);
|
||||
remove(framename);
|
||||
free(framename);
|
||||
|
||||
iw++;
|
||||
}
|
||||
ih++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
printf("\n\n!!! DONE !!!\nYour avatar name is: %s%ds*%dh*%dv*.mov\n", filename, numFrames, piecesX, piecesY);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user