6eab7fc47402f1ce34ed331ae80f5bcbee54da82 braney Thu Dec 16 13:30:33 2010 -0800 remove USE_PNG and GIF support #1323 diff --git src/lib/gifLabel.c src/lib/gifLabel.c index 88c5fde..b01f77f 100644 --- src/lib/gifLabel.c +++ src/lib/gifLabel.c @@ -65,47 +65,34 @@ if (n1->colorsUsed != n2->colorsUsed) { return FALSE; } if (memcmp(n1->colorMap, n2->colorMap, 256 * 3)!=0) { return FALSE; } /* gif colormaps differ */ long bytes = (long)n1->width * n1->height; if (memcmp(n1->pixels, n2->pixels, bytes)!=0) { return FALSE; } /* gif contents differ */ return TRUE; } void gifLabelVerticalText(char *fileName, char **labels, int labelCount, int height) /* Make a gif file with given labels. This will check to see if fileName * exists already and has not changed, and if so do nothing. */ { struct memGfx *straight = altColorLabels(labels, labelCount, height); struct memGfx *rotated = mgRotate90(straight); struct memGfx *existing = NULL; -#ifdef USE_PNG struct tempName tn; makeTempName(&tn, "gifLabelVertTemp", ".png"); mgSavePng(rotated, tn.forCgi, FALSE); rename(tn.forCgi, fileName); -#else -if (fileExists(fileName)) - existing = mgLoadGif(fileName); -/* the savings here is in the user's own browser cache - not updated if no change */ -if (!sameGifContents(rotated, existing)) - { - struct tempName tn; - makeTempName(&tn, "gifLabelVertTemp", ".gif"); - mgSaveGif(rotated, tn.forCgi, FALSE); - rename(tn.forCgi, fileName); - } -#endif mgFree(&straight); mgFree(&rotated); if (existing) mgFree(&existing); } #ifdef DEBUG void gifTest() { static char *labels[] = {"cerebellum", "thymus", "breast", "heart", "stomach", "cartilage", "kidney", "liver", "lung", "testis", "black hole" }; int size = gifLabelMaxWidth(labels, ArraySize(labels)); int gifLabelMaxWidth(char **labels, int labelCount)