equal
deleted
inserted
replaced
79 return (0); |
79 return (0); |
80 } |
80 } |
81 |
81 |
82 if (setjmp(png_jmpbuf(png))) { |
82 if (setjmp(png_jmpbuf(png))) { |
83 fclose(f); |
83 fclose(f); |
|
84 png_destroy_info_struct(png, &pnginfo); |
84 png_destroy_write_struct(&png, &pnginfo); |
85 png_destroy_write_struct(&png, &pnginfo); |
85 return (0); |
86 return (0); |
86 } |
87 } |
87 |
88 |
88 /* predat knihovne PNG ukazatel na soubor */ |
89 /* predat knihovne PNG ukazatel na soubor */ |
104 for (y = 0; y < img->height; y++, data += img->width * img->pixel_size) |
105 for (y = 0; y < img->height; y++, data += img->width * img->pixel_size) |
105 png_write_row(png, (png_byte *) data); |
106 png_write_row(png, (png_byte *) data); |
106 |
107 |
107 /* ukoncit soubor a uvolnit pomocne struktury */ |
108 /* ukoncit soubor a uvolnit pomocne struktury */ |
108 png_write_end(png, pnginfo); |
109 png_write_end(png, pnginfo); |
|
110 png_destroy_info_struct(png, &pnginfo); |
109 png_destroy_write_struct(&png, 0); |
111 png_destroy_write_struct(&png, 0); |
110 |
112 |
111 fclose(f); |
113 fclose(f); |
112 |
114 |
113 return (1); |
115 return (1); |