Page 1 of 1

Identify .JPM-File | Missing "IM_MOD_RL_JPM_.dll"

Posted: 2014-09-18T01:24:41-07:00
by Mauleyy
Hello community,
I have a problem with identify a .JPM file. A .JPM file is a JPEG-2000 Part 5 multipage file.
If I try to identify it I get the error:

Code: Select all

C:\Users\hueser>cd c:\tmp
C:\tmp>identify.exe DirectoryName = "C:\tmp\JPGATTREXC-2\JPGATTREXC-2\bin\Debug\testFiles\JPG2000\image.jpm"
identify.exe: unable to open image `DirectoryName': No such file or directory @error/blob.c/OpenBlob/2658.
identify.exe: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
identify.exe: unable to open image `=': No such file or directory @ error/blob.c/OpenBlob/2658.
identify.exe: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
identify.exe: unable to open module file `C:\Program Files (x86)\ImageMagick-6.8.9-Q16\modules\coders\IM_MOD_RL_JPM_.dll': No such file or directory @ warning/module.c/GetMagickModulePath/672.identify.exe: no decode delegate for this image format `JPM' @ error/constitute.c/ReadImage/501.
c:\tmp>
Here is the file I tried: https://dl.dropboxusercontent.com/u/702 ... /image.jpm

Can someone help me?

Greetings.

Re: Identify .JPM-File | Missing "IM_MOD_RL_JPM_.dll"

Posted: 2014-09-18T04:00:15-07:00
by dlemstra
Can you remove the 'DirectoryName = ' part and try again?

Re: Identify .JPM-File | Missing "IM_MOD_RL_JPM_.dll"

Posted: 2014-09-18T04:27:20-07:00
by Mauleyy
dlemstra wrote:Can you remove the 'DirectoryName = ' part and try again?
Didn't work :/ . And I don't know why there was the "DirectoryName = " at the beginning.
It don't works with the ImageMagick.NET and with the console.

Code: Select all

C:\Users\hueser>cd C:\tmp

C:\tmp>identify.exe "C:\tmp\JPGATTREXC-2\JPGATTREXC-2\bin\Debug\testFiles\JPG2000\image.jpm"
identify.exe: unable to open module file `C:\Program Files (x86)\ImageMagick-6.8.9-Q16\modules\coders\IM_MOD_RL_JPM_.dll': No such file or directory @ warning/module.c/GetMagickModulePath/672.
identify.exe: no decode delegate for this image format `JPM' @ error/constitute.c/ReadImage/501.

C:\tmp>

Re: Identify .JPM-File | Missing "IM_MOD_RL_JPM_.dll"

Posted: 2014-09-18T07:06:52-07:00
by snibgo
Does "identify -format" list the JPM format? It doesn't for me, so my version of IM (the standard pre-built Windows binary) can't read JPM files.

Re: Identify .JPM-File | Missing "IM_MOD_RL_JPM_.dll"

Posted: 2014-09-18T10:05:45-07:00
by dlemstra
The format will be available in the next release (IM 6.8.9-8), you could do the following for now:

Code: Select all

convert j2k:c:\yourfolder\image.jpm image.png
or in Magick.NET:

Code: Select all

using (MagickImage image = new MagickImage("j2k:c:\yourfolder\image.jpm"))
{
  image.Write("image.png");
}

Re: Identify .JPM-File | Missing "IM_MOD_RL_JPM_.dll"

Posted: 2014-09-19T08:09:45-07:00
by Mauleyy
dlemstra wrote:The format will be available in the next release (IM 6.8.9-8), you could do the following for now:

Code: Select all

convert j2k:c:\yourfolder\image.jpm image.png
or in Magick.NET:

Code: Select all

using (MagickImage image = new MagickImage("j2k:c:\yourfolder\image.jpm"))
{
  image.Write("image.png");
}

I tried the following code in .NET but it doesn't work as well.
The format isn't available

Re: Identify .JPM-File | Missing "IM_MOD_RL_JPM_.dll"

Posted: 2014-09-19T11:07:40-07:00
by dlemstra
You are correct. I have updated the stackoverflow post and you should use the following code for now:

Code: Select all

MagickReadSettings settings = new MagickReadSettings()
{
  Format = MagickFormat.J2k
};

using (FileStream memStream = File.OpenRead(@"c:\yourfolder\image.jpm"))
{
  using (MagickImage image = new MagickImage(memStream, settings))
  {
    image.Write(@"image.png");
  }
}

Re: Identify .JPM-File | Missing "IM_MOD_RL_JPM_.dll"

Posted: 2014-09-26T00:29:35-07:00
by Mauleyy
Can you explain me how I can loop through the .JPM pages and get their width and height?

Re: Identify .JPM-File | Missing "IM_MOD_RL_JPM_.dll"

Posted: 2014-09-26T00:43:12-07:00
by dlemstra
I send you a PM to ask if you could supply a .jpm file that contains multiple frames, your example does not contain multiple frames.