Quote:
Is there any way to invert it?
|
Only on 1.21 using the previous script I posted, or if you can figure out a way around the issue I noted in the comments:
Code:
// In newer versions this seems to say "Error: truncated jbig2 segment header"
// var fgImg = doc.addImage(new Image(fgPix, doc.loadImage(mask)));
// Quick workaround for the above problem
var fgImg = doc.graftObject(mask);
I suspect that won't be possible without diving into the MuPDF source though.