mirror of
https://github.com/wmjordan/PDFPatcher.git
synced 2026-10-17 04:41:14 +08:00
- 修复 JBIG2 编码器的导出错误 (fixed #110)
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using FreeImageAPI;
|
||||
|
||||
namespace PDFPatcher.Processor.Imaging
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user