diff --git a/App/Processor/Imaging/JBig2Encoder.cs b/App/Processor/Imaging/JBig2Encoder.cs index 00953eb..e5ff4c9 100644 --- a/App/Processor/Imaging/JBig2Encoder.cs +++ b/App/Processor/Imaging/JBig2Encoder.cs @@ -1,7 +1,5 @@ using System; -using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Text; using FreeImageAPI; namespace PDFPatcher.Processor.Imaging diff --git a/JBig2/src/jbig2enc.lossless.cc b/JBig2/src/jbig2enc.lossless.cc index 6aaa1f9..cf55373 100644 --- a/JBig2/src/jbig2enc.lossless.cc +++ b/JBig2/src/jbig2enc.lossless.cc @@ -195,10 +195,10 @@ jbig2_encode_generic(struct Pix *const bw, const bool full_headers, const int xr // see comments in .h file u8 * -jbig2_encode (int width, int height, int stride, bool zeroIsWhite, uint32_t * const source, int *const length) { +jbig2_encode (int width, int height, int stride, bool zeroIsWhite, uint8_t * const source, int *const length) { u8 * ret; u32 mask = zeroIsWhite ? 0x0 : 0xffffffff; - u8* pl = (u8*)source; + u8* pl = source; u8* p; u32* pw; char a, b; @@ -224,7 +224,7 @@ jbig2_encode (int width, int height, int stride, bool zeroIsWhite, uint32_t * co Pix * pix = (Pix*)malloc(sizeof(Pix)); pix->w = width; pix->h = height; - pix->data = source; + pix->data = (u32*)source; ret = jbig2_encode_generic (pix, false, 0, 0, false, length); free(pix); return ret;