Changing image names and location

This commit is contained in:
Kushal K S V S 2017-08-06 11:43:02 -07:00
parent 2b001c149d
commit 0a920f8028
6 changed files with 12 additions and 5 deletions

View File

@ -453,8 +453,8 @@ void Print_Row( FILE* fp, int index, char* name, int diff )
<td>%04d</td>\n\
<td>%s</td>\n\
<td>%04d</td>\n\
<td id=\"image_row\"><img id=\"sprite\" src=\"images/sprite_%04d.png\"></td>\n\
</tr>\n", index, name, diff, index);
<td id=\"image_row\"><img id=\"sprite\" src=\"images/%s.png\"></td>\n\
</tr>\n", index, name, diff, name);
}
int First_Column(IMAGE* input){

View File

@ -0,0 +1 @@
The HTML files generated are in this directory

View File

@ -49,7 +49,7 @@ int main(int argc, char const *argv[])
FT_Error error;
int alignment = 4;
char * output_file_name = ( char * )calloc(20,sizeof(char));
char * output_file_name = ( char * )calloc(50,sizeof(char));
IMAGE* base_png = (IMAGE*)malloc(sizeof(IMAGE));
IMAGE* test_png = (IMAGE*)malloc(sizeof(IMAGE));
@ -309,6 +309,10 @@ int main(int argc, char const *argv[])
mkdir("./images/", 0777);
}
if (stat("./html/images/", &st) == -1) {
mkdir("./html/images/", 0777);
}
FILE* fp = fopen("index.html","w");
fprintf(fp,
@ -455,8 +459,6 @@ int main(int argc, char const *argv[])
Stitch( combi_effect_1, combi_effect_2, output);
Generate_PNG ( output, output_file_name, render_mode );
if (FT_HAS_GLYPH_NAMES(base_face))
{
FT_Get_Glyph_Name( base_face,
@ -465,6 +467,10 @@ int main(int argc, char const *argv[])
50 );
}
sprintf( output_file_name, "./html/images/%s.png", glyph_name );
Generate_PNG ( output, output_file_name, render_mode );
Print_Row(fp,i,glyph_name,pixel_diff );
}
}