Getmediainfo retrieves metadata of digital media files, in XML format.
command=getmediainfo&<parameter>=<value>&...
width
and height
parameters. This means that the entire image will be visible, and that if the box has a different aspect ratio from the image, the image will be centered in the box, either in height or width, leaving part of the background of the box (the so-called canvas) empty. The empty part of the canvas can be given a colour using the canvascolor
parameter.width
and height
parameters. This means that only part of the image will be visible if the box has a different aspect ratio from the image. Which part of the image will be visible, can be determined by the fillmode
parameter; by default the left or top part of the image will be visible.Besides scaling the image, the box containing the image can be presented with rounded corners, using the cornerradius
and cornercolor
parameters.
scalemode=fill
argument] determines which part of the image will be visible. You can choose from three options:scalemode=fit
argument or the imageformat
parameter] determines the colour of the empty part of the canvas of the box specified using the width
and height
parameters. Colour names are determined by the .NET Framework 4 Color Structure object, which is documented on: MSDN. Examples of colour names are: black
, white
, transparent
, orange
, etc.
scalemode
or imageformat
parameter] specifies the radius (in pixels) of rounded corners of the box specified using the width
and height
parameters. The minimum value is 10.
scalemode
or imageformat
parameter] determines the colour of the space left open by rounded corner of the box specified using the width
, height
and cornerradius
parameters. Colour names are determined by the .NET Framework 4 Color Structure object, which is documented on: MSDN. Examples of colour names are: black
, white
, transparent
, orange
, etc.
jpg
for example. With this parameter, the source image file format will automatically be transformed to the target format before sending the file; the source file format and the cached file format* remain unchanged. Valid values for this parameter are: jpg
, tiff
, png
, and ico
. If you choose png
you can choose to set the canvascolor
and/or the cornercolor
parameters to the value transparent
. imageformat
parameter, the image will always be retrieved in the original image file format.bmp
format and have a double file extension of the type .<original extension>.bmp
. This intermediate storage format is for internal image handler purposes only, to improve its performance, but you can forget all about it when you use the getmediainfo
command (with or without the imageformat
parameter).
The Axiell WebAPI has built in functionality to retrieve images, movies and audio files, using the getcontent
command. When a URL containing getcontent
is executed in an internet browser, the media file type will be recognized by the browser (if the browser supports the file format) and the file becomes (dis)playable instantly. On the other hand, when a URL containing getcontent
has been set as a retrieval path for an image field in an Adlib for Windows (not Axiell Collections) application, Adlib won't recognize the media types of files other than images and will therefore only display linked media files in the Media Viewer if those are image files. Instead of the getcontent
command in retrieval paths, we must therefore use the getmediainfo
command in Adlib applications. When a URL containing getmediainfo
is executed in an internet browser, it will only retrieve some metadata of the relevant media file, like the following, instead of (dis)playing it:
<?xml version="1.0" encoding="UTF-8"?> <adlibXML> <recordList> <record> <path>\\museum.org\axiell\backend\images\wildlife.wmv</path> <thumbnailpath></thumbnailpath> <content-type>Video</content-type> <mime-type>video/x-ms-wmv</mime-type> </record> </recordList> </adlibXML>
In Axiell Collections applications however, it will only display an error message in the Media Viewer.
To use this functionality, the server manager must have setup an "image handler" using the adlibweb.xml parameter file. In Collections, images, movies or audio files will be retrieved (downloaded, not streamed) using the getmediainfo
command. To retrieve a file's metadata, the caller needs to provide at least two arguments: the name of the server in the server
argument and the file identifier in the value
argument. The media file id can be retrieved from database records. Image ids are usually stored in the reproduction.reference field.
All arguments other than server
and value
automatically apply to image files only, not to other media files.
The Axiell WebAPI does not support streaming media. You'll have to set up a third-party streaming media server to be able to stream movies or audio.
The Axiell WebAPI recognizes the following media file types: .ai, .aif, .aifc, .aiff, .asc, .atom, .au, .avi, .bcpio, .bin, .bmp, .cdf, .cgm, .class, .cpio, .cpt, .csh, .css, .dcr, .dif, .dir, .djv, .djvu, .dll, .dmg, .dms, .doc, .docx, .dtd, .dv, .dvi, .dxr, .eps, .etx, .exe, .ez, .flv, .gif, .gram, .grxml, .gtar, .hdf, .hqx, .htm, .html, .ice, .ico, .icon, .ics, .ief, .ifb, .iges, .igs, .jnlp, .jp2, .jpe, .jpeg, .jpg, .js, .kar, .latex, .lha, .lzh, .m3u, .m4a, .m4b, .m4p, .m4u, .m4v, .mac, .man, .mathml, .me, .mesh, .mid, .midi, .mif, .mov, .movie, .mp2, .mp3, .mp4, .mpe, .mpeg, .mpg, .mpga, .ms, .msh, .mxu, .nc, .oda, .ogg, .pbm, .pct, .pdb, .pdf, .pgm, .pgn, .pic, .pict, .png, .pnm, .pnt, .pntg, .ppm, .ppt, .pptx, .ps, .qt, .qti, .qtif, .ra, .ram, .ras, .rdf, .rgb, .rm, .roff, .rtf, .rtx, .sgm, .sgml, .sh, .shar, .silo, .sit, .skd, .skm, .skp, .skt, .smi, .smil, .snd, .so, .spl, .src, .sv4cpio, .sv4crc, .svg, .swf, .t, .tar, .tcl, .tex, .texi, .texinfo, .tif, .tiff, .tr, .tsv, .txt, .ustar, .vcd, .vrml, .vxml, .wav, .wbmp, .wbmxl, .wma, .wml, .wmlc, .wmls, .wmlsc, .wmv, .wrl, .xbm, .xht, .xhtml, .xls, .xlsx, .xml, .xpm, .xsl, .xslt, .xul, .xwd, .xyz and .zip.
Retrieve metadata of image file 2043.jpg from the image server show
- no further description -
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getmediainfo&server=adlibimages&value=2043.jpg
Retrieve metadata of image file 2043.jpg from the image server. The URL contains scaling instructions for use as a retrieval path in an adlwin.exe application show
Any image can be scaled by the web service to make optimal use of that image in your application. This functionality can be invoked by adding height
and width
parameters. These parameters define the target area to which the image needs to be scaled. The original aspect ratio of the image is automatically maintained, so the actual image size will in most cases be smaller than the requested rectangle. Images are automatically centered in the requested rectangle.
The scaling is performed on the fly, there is no need to prepare images for a certain size. Having said this, the web service will cache the scaled images for future use.
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getmediainfo&server=adlibimages&value=2043.jpg&width=100&height=200
Retrieve metadata of image file 2043.jpg. The URL contains scaling instructions (for use as a retrieval path in an adlwin.exe application) to fit the image within a square box with a whitesmoke background and rounded corners show
- no further description -
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getmediainfo&server=adlibimages&value=2043.jpg&width=200&height=200&scalemode=fit&canvascolor=whitesmoke&cornerradius=20
Retrieve metadata of image file 2043.jpg. The URL contains scaling instructions (for use as a retrieval path in an adlwin.exe application) to fill a square box with the image whilst only show the top part show
- no further description -
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getmediainfo&server=adlibimages&value=2043.jpg&width=200&height=200&scalemode=fill&fillmode=topleft
Retrieve metadata of image file 2043.jpg. The URL contains scaling instructions (for use as a retrieval path in an adlwin.exe application) to fill a circular box with the image and only show the top part of the image against a linen background show
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getmediainfo&server=adlibimages&value=2043.jpg&width=200&height=200&scalemode=fill&fillmode=topleft&cornerradius=100&cornercolor=linen
Retrieve metadata of image file 2043.jpg. The URL contains instructions (for use as a retrieval path in an adlwin.exe application) to transform the image to the png file format, scale it to fill a box with rounded corners and only show the top part of the image against a transparent background show
- no further description -
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getmediainfo&server=adlibimages&value=2043.jpg&width=200&height=200&scalemode=fill&fillmode=topleft&imageformat=png&cornerradius=20&cornercolor=transparent
Retrieve metadata of image file yorym_2000_628-obv.jpg from the subfolder /coins underneath the main image folder show
If desired, the / in the file path can be replaced by its HTTP escape code %2F.
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getmediainfo&server=adlibimages&value=coins/yorym_2000_628-obv.jpg
Retrieve metadata of the wildlife.wmv movie file. In adlwin.exe, the URL will allow the Media Viewer to play the movie. show
http://test2.adlibsoft.com/api/wwwopac.ashx?command=getmediainfo&server=adlibimages&value=wildlife.wmv
- no Adlib.Data-specific description available yet; see the URL request tab for all information -
- no jQuery-specific description available yet; see the URL request tab for all information -