Bit swap when writing FORMAT_A1 to PNG on little endian

This commit is contained in:
Adrian Johnson 2008-06-04 22:59:53 +09:30
parent 1d8596d5b0
commit a922a0c5cf

View file

@ -197,6 +197,9 @@ write_png (cairo_surface_t *surface,
case CAIRO_FORMAT_A1:
depth = 1;
png_color_type = PNG_COLOR_TYPE_GRAY;
#ifndef WORDS_BIGENDIAN
png_set_packswap (png);
#endif
break;
default:
status = _cairo_error (CAIRO_STATUS_INVALID_FORMAT);