Hi there
We will soon be receiving some XML files that basically contain raw binary image data that then need to be converted into the actual image file including the metadata also contained in the same XML file.
Is this something ImageMagick can handle? I've had a quick look around and there seems to be some references to raw data but i'm not 100% sure what I'm looking for either.
Thanks much for your time
Regards
Laura
Raw Binary Date to Image File
Re: Raw Binary Date to Image File
Post a URL to one or two sample XML files. We'll need to inspect them before we can comment.
Re: Raw Binary Date to Image File
Thanks for your response, just as soon as I have one I will post it.
Can you give me some idea of what IM is capable of in regards to this sort of thing? We are investigating various means of generating the image and this is one of them.
Thanks again
-- Laura
Can you give me some idea of what IM is capable of in regards to this sort of thing? We are investigating various means of generating the image and this is one of them.
Thanks again
-- Laura
Re: Raw Binary Date to Image File
Here's a sample of the XML with the image data truncated, I can email/post the actual xml somewhere if required didn't want to mess up the board with masses of garbage.
Thanks for any assistance
Thanks for any assistance
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<MLW Cmd="35" TStamp="2014-01-31T04:49:07" Id="n07" OrgId="750487691" DevId="353575050957244" RouteId="2352:8250" TruckId="N07" StopId="123931" LocationKey="27337" LTStamp="2014-01-31T15:49:07" GroupName="xxxxx" GroupId="2160" SType="3" Name="xxxxx" LocationAddress="xxxxx" LocationCity="xxxxx" LocationState="xxxx" LocationPostalCode="xxxx">
<FieldData LCode="2" OwnerId="222561">
<Field FId="3199" Name="Image" Value="ffd8ffe000104a46494600010100000100010000ffdb00430003020 …..<truncated>…. f00f5d1450f710f5184233d2a56e2107032dd78a28abec23fffd9" />
</FieldData>
<Job Id="222561" JobId="222561" JType="3" Status="4" Name="xxxxxx" DispID="XXXXX">
<Item ItemId="225583" Status="4" Key="" Name="" />
</Job>
<Job Id="222571" JobId="222571" JType="3" Status="3" Name="xxxxxx" DispID="XXXXX">
<Item ItemId="225593" Status="3" Key="" Name="" />
</Job>
<Job Id="222573" JobId="222573" JType="3" Status="3" Name="xxxxxx" DispID="XXXXX">
<Item ItemId="225595" Status="3" Key="" Name="" />
</Job>
</MLW>
Re: Raw Binary Date to Image File
Your image is likely base-64 encoded. ImageMagick can read inlined base-64 encoded images from the command line, for example:
- convert inline:<your base-64 encoded inlined image here> image.png