summaryrefslogtreecommitdiff
path: root/png2ff.c
diff options
context:
space:
mode:
authorFRIGN <dev@frign.de>2016-03-04 12:31:58 +0100
committerFRIGN <dev@frign.de>2016-03-04 12:31:58 +0100
commit1d07cf4473ef4539d3ea249bf7e751a695470ff9 (patch)
treea202b3544e1485fecb851dffa2e938a2e2fbbfa9 /png2ff.c
parent4d567caa917deab542225fd548a2673dea42461c (diff)
Add proper blank lines in png2ff(1) before comments
Diffstat (limited to 'png2ff.c')
-rw-r--r--png2ff.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/png2ff.c b/png2ff.c
index 99757be..cf85b32 100644
--- a/png2ff.c
+++ b/png2ff.c
@@ -55,12 +55,14 @@ main(int argc, char *argv[])
width = png_get_image_width(pngs, pngi);
height = png_get_image_height(pngs, pngi);
pngrows = png_get_rows(pngs, pngi);
+
/* allocate output row buffer */
rowlen = width * strlen("RGBA");
if (!(row = malloc(rowlen * sizeof(uint16_t)))) {
fprintf(stderr, "%s: malloc: out of memory\n", argv0);
return 1;
}
+
/* write header */
fputs("farbfeld", stdout);
tmp32 = htonl(width);
@@ -69,6 +71,7 @@ main(int argc, char *argv[])
tmp32 = htonl(height);
if (fwrite(&tmp32, sizeof(uint32_t), 1, stdout) != 1)
goto writerr;
+
/* write data */
switch(png_get_bit_depth(pngs, pngi)) {
case 8: