summaryrefslogtreecommitdiffstats
path: root/libdimension/png.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/png.c')
-rw-r--r--libdimension/png.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libdimension/png.c b/libdimension/png.c
index 9bece58..7c21475 100644
--- a/libdimension/png.c
+++ b/libdimension/png.c
@@ -21,7 +21,6 @@
#include "dimension_impl.h"
#include <pthread.h>
#include <png.h>
-#include <arpa/inet.h>
#include <errno.h>
#include <setjmp.h>
#include <stdlib.h>
@@ -245,7 +244,7 @@ dmnsn_png_write_canvas_thread(void *ptr)
/* Write the info struct */
png_write_info(png_ptr, info_ptr);
- if (htonl(1) != 1) {
+ if (dmnsn_is_little_endian()) {
/* We are little-endian; swap the byte order of the pixels */
png_set_swap(png_ptr);
}