

Or converted to XML using the ElementTree module. Here, myResult is an Element object that can either be used directly, findtext ( './properties/jp2HeaderBox/imageHeaderBox/height' ) print ( imageHeight ) checkOneFile ( myFile ) # Return image height value imageHeight = myResult. The following minimal script shows how this works: #! /usr/bin/env python from jpylyzer import jpylyzer # Define JP2 myFile = "/home/johan/jpylyzer-test-files/aware.jp2" # Analyse with jpylyzer, result to Element object myResult = jpylyzer. In practice you will most likely only need the checkOneFile function. Subsequently you can call any function that is defined in jpylyzer.py.
#Oxygen xml editor jypylyzer code
Then import jpylyzer into your code by adding: from jpylyzer import jpylyzer It as a module in your own Python programs. Instead of using jpylyzer from the command-line, you can also import PropertiesExtension: wrapper element for NISO MIX output (only if the -mix option is used) Properties: image properties (organised by box) Tests: outcome of the individual tests that are part of the StatusInfo: information about the status of jpylyzer's validation attempt In turn, each file element contains the following sub-elements:įileInfo: general information about the analysed file One or more file elements, each of which contain information about about the analysed files One toolInfo element, which contains information about jpylyzer (its name and version number) The output file contains the following top-level elements: Alternatively use a dedicated XML editor, or open the file in your web browser. By default jpylyzer’s XML is pretty-printed, so you should be able to view the file using your favourite text editor. In the above example, output is redirected to the file ‘rubbish.xml’. Output is directed to the standard output device ( stdout). Wrap output for individual image(s) in 'results' XML element (deprecated from jpylyzer 2.x onward, only takes effect if -legacyout is used) Report packet-level codestream markers (plm, ppm, plt, ppt) When analysing a directory, recurse into subdirectories (implies -wrapper if -legacyout is used) Report output in jpylyzer 1.x format (provided for backward compatibility only)Įxtract null-terminated XML content from XML and UUID boxes(doesn't affect validation) Report additional output in NISO MIX format (version 1.0 or 2.0) Validation format allowed values are jp2 (used by default) and j2c (which activates raw codestream validation) Input JP2 image(s), may be one or more (whitespace-separated) path expressions prefix wildcard (*) with backslash (\) in Linux
#Oxygen xml editor jypylyzer manual
Please visit the jpylyzer homepage for links to the most recent package downloads (Debian packages and Windows binaries), and a User Manual which documents all aspects of the software:Ĭalling jpylyzer in a command window without any arguments results in the following helper message: usage: jpylyzer The SCAPE project is co-funded by the European Union under FP7 ICT-2009.4.1 (Grant Agreement number 270137). Its development was partially supported by the SCAPE Project.

Jpylyzer is a JP2 (JPEG 2000 Part 1) image validator and properties extractor.
