1;
2; by Sylwester Arabas <slayoo (at) igf.fuw.edu.pl>
3; Check PPM & PGM; James Tappin.
4
5function QUERY_PPM, filename, info, maxval = maxval
6;
7
8compile_opt idl2, hidden
9
10ON_ERROR, 2
11;
12; Do we have access to ImageMagick functionnalities ??
13;
14if (MAGICK_EXISTS() EQ 0) then begin
15    MESSAGE, /continue, "GDL was compiled without ImageMagick support."
16    MESSAGE, "You must have ImageMagick support to use this functionaly."
17 endif
18
19;
20; TODO: MAXVAL keyword
21;
22if arg_present(maxval) then message, /continue, $
23                                     "MAXVAL not yet implemented."
24
25if MAGICK_PING(filename, 'PPM', info = info) then return, 1
26return, magick_ping(filename, 'PGM', info = info)
27;
28end
29