Annotations Breaking nconvert for .MAG files

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, xnview

Post Reply
qdean
Posts: 3
Joined: Wed Dec 11, 2019 2:47 pm

Annotations Breaking nconvert for .MAG files

Post by qdean » Wed Dec 11, 2019 3:12 pm

I'm using nconvert for a multimillion document extraction and conversion from a Document management system called Fortis.
The nconvert tool has been taking these document types like a champ and converting them to compression 4 tiffs, but after increasing my sample size in Test I'm starting to run into issues.

Certain documents give me this error:
my_error_exit...<Not a JPEG file: starts with 0x57 0x54>
Error: Don't know how to read this picture (\\ITRECORDS\ARCHIVE\ACC\WTI1C0\0001C0DE.MAG)

I believe some of this is the way Fortis saves their annotation information. (Which is bad practice I know) After running some of the erroring documents through a hex editor I get annotation information in the header or I see there are annotations on the document. I'm still looking into it and trying to figure out how annotations get stored on these MAG files so maybe I can strip them out.

My question is, is there anyway we can re-mediate this? Have you guys seen this issue before? Is there a way to detect annotations and strip them from the document?

cday
XnThusiast
Posts: 2276
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Annotations Breaking nconvert for .MAG files

Post by cday » Wed Dec 11, 2019 3:31 pm

You could possibly upload a sample file, if you are able to, that illustrates the problem for Pierre -- the only developer of all XnView software -- to have a look at if he has time...

Otherwise, you could possibly try the following option:

Code: Select all

-ignore_errors    : Ignore errors
... a rather long shot, I would think!

qdean
Posts: 3
Joined: Wed Dec 11, 2019 2:47 pm

Re: Annotations Breaking nconvert for .MAG files

Post by qdean » Wed Dec 11, 2019 4:21 pm

Thanks for the quick response.

Absolutely! That's my intention. I got with my team (waiting to hear back) to make sure I'm grabbing a file that doesn't have sensitive information on it.

Yeah I did try the ignore errors flag and it still doesn't like it.

qdean
Posts: 3
Joined: Wed Dec 11, 2019 2:47 pm

Re: Annotations Breaking nconvert for .MAG files

Post by qdean » Wed Dec 11, 2019 8:39 pm

The batch of files that broke for nconvert also broke under another file conversion. After more testing it looks like a number of these files are not just images but PDFs and MS Word Documents wrapped in this file type of MAG.

How does nconvert identify files? Is it just searching for an image?

Post Reply