comparison src/libgfx.c @ 1303:be30466fbc47

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 19 Aug 2017 11:54:20 +0300
parents 38614c07c2e2
children e968b259605b
comparison
equal deleted inserted replaced
1302:38614c07c2e2 1303:be30466fbc47
837 837
838 int dmWritePCXImageFILE(FILE *fp, DMImage *img, const DMImageConvSpec *pspec) 838 int dmWritePCXImageFILE(FILE *fp, DMImage *img, const DMImageConvSpec *pspec)
839 { 839 {
840 DMPCXData pcx; 840 DMPCXData pcx;
841 DMPCXHeader hdr; 841 DMPCXHeader hdr;
842 DMImageConvSpec spec;
842 int res; 843 int res;
843 DMImageConvSpec spec; 844
844 845 // Always force planar for PCX
845 memcpy(&spec, pspec, sizeof(DMImageConvSpec)); 846 memcpy(&spec, pspec, sizeof(DMImageConvSpec));
846 spec.format = spec.paletted ? DM_IFMT_PALETTE : DM_IFMT_RGB;
847 spec.planar = TRUE; 847 spec.planar = TRUE;
848 848
849 // Create output file 849 // Create output file
850 pcx.buf = NULL; 850 pcx.buf = NULL;
851 pcx.header = &hdr; 851 pcx.header = &hdr;