Code covered by the BSD License  

Highlights from
JPEG2000

from JPEG2000 by Peter Rydesäter
Reads and writes files in the new JPEG 2000 image format.

fmt=ispgx(filename)
% ISPGX returns 'pgx' if it is an pgx file
function fmt=ispgx(filename)
  fmt='';
  if length(filename)<4,
    return;
  end
  ext=lower(filename(end-3:end));
  if strcmp(ext,'.pgx'),
    fmt='pgx';
  end
  return;

Contact us at files@mathworks.com