Menu

#299 Xena failing to normalise raster images

open
None
7
2012-03-16
2009-12-08
Anonymous
No

Testing in Testing Branch - Xena 5.0.0 Image plugin 4.5.5.

Xena is not normalising raster images in Mac and Windows.

Mac:
Files with the following extensions fail: pcx, xpm, ras, sun, cur.

Win:
Some ras raster images fail - all others (pcx, xpm, cur) normalise OK.

Discussion

  • Michael Carden

    Michael Carden - 2010-04-08

    Is this a confirmed bug? Please close if not relevant or raise priority and assign if it's still an issue.

     
  • Michael Carden

    Michael Carden - 2010-04-08
    • assigned_to: nobody --> acunliffe
     
  • Allan Cunliffe

    Allan Cunliffe - 2010-04-13
    • assigned_to: acunliffe --> matthewoliver
     
  • Allan Cunliffe

    Allan Cunliffe - 2010-04-13

    Re-tested in Linux Ubuntu 9.10, Windows Vista and XP. Xena 5.0.0 (stable) and 5.0.1(testing). Image plugin is 4.5.5b10. ImageMagick version is 6.5.1-0 in Linux and 6.5.8-2 in Windows.

    The following is displayed in the GUI for files "image-ras-runlength-enc.ras" and "image--im1-runlength-enc.im1" (both of these normalise OK in Linux and can be exported OK):

    org.im4java.core.CommandException
    Trace:
    au.gov.naa.digipres.xena.kernel.normalise.NormaliserManager.parse(NormaliserManager.java:826)
    au.gov.naa.digipres.xena.kernel.normalise.NormaliserManager.normalise(NormaliserManager.java:1005)
    au.gov.naa.digipres.xena.core.Xena.normalise(Xena.java:599)
    au.gov.naa.digipres.xena.core.Xena.normalise(Xena.java:543)
    au.gov.naa.digipres.xena.litegui.NormalisationThread.normaliseFile(NormalisationThread.java:328)
    au.gov.naa.digipres.xena.litegui.NormalisationThread.normaliseStandard(NormalisationThread.java:250)
    au.gov.naa.digipres.xena.litegui.NormalisationThread.run(NormalisationThread.java:191)

    If I try to use convert the above to a png ("ras.png") via the command line in Windows, I get: "convert: MissingAnImageFilename `ras.png' @ convert.c/ConvertImageCommand/2838.":

    For file "image-pam.pam" and "image-yuv.yuv":

    nu.xom.ParsingException: Content is not allowed in prolog. at line 1, column 39
    Trace:
    au.gov.naa.digipres.xena.kernel.normalise.NormaliserManager.parse(NormaliserManager.java:826)
    au.gov.naa.digipres.xena.kernel.normalise.NormaliserManager.normalise(NormaliserManager.java:1005)
    au.gov.naa.digipres.xena.core.Xena.normalise(Xena.java:599)
    au.gov.naa.digipres.xena.core.Xena.normalise(Xena.java:543)
    au.gov.naa.digipres.xena.litegui.NormalisationThread.normaliseFile(NormalisationThread.java:328)
    au.gov.naa.digipres.xena.litegui.NormalisationThread.normaliseStandard(NormalisationThread.java:250)
    au.gov.naa.digipres.xena.litegui.NormalisationThread.run(NormalisationThread.java:191)

    The above pam can be converted to a png with Convert. The above yuv fails when I try to convert to PNG with Convert:

    convert: MustSpecifyImageSize `C:\Users\allan\Desktop\raster\image-yuv.yuv' @ yuv.c/ReadYUVImage/149.
    convert: MissingAnImageFilename `yuv.png' @ convert.c/ConvertImageCommand/2838.

    For "image-pbm-ascii.pbm":

    For input string: "0010010100100100100100100100010001000100010000100010000100001000100001"
    Trace:
    java.lang.NumberFormatException.forInputString(Unknown Source)
    java.lang.Integer.parseInt(Unknown Source)
    java.lang.Integer.parseInt(Unknown Source)
    org.apache.sanselan.formats.pnm.PBMFileInfo.getRGB(PBMFileInfo.java:96)
    org.apache.sanselan.formats.pnm.FileInfo.readImage(FileInfo.java:76)
    org.apache.sanselan.formats.pnm.PNMImageParser.getBufferedImage(PNMImageParser.java:279)
    org.apache.sanselan.Sanselan.getBufferedImage(Sanselan.java:1264)
    org.apache.sanselan.Sanselan.getBufferedImage(Sanselan.java:1163)
    org.apache.sanselan.Sanselan.getBufferedImage(Sanselan.java:1136)
    au.gov.naa.digipres.xena.plugin.image.ImageToXenaPngNormaliser.parse(ImageToXenaPngNormaliser.java:65)
    au.gov.naa.digipres.xena.kernel.normalise.NormaliserManager.parse(NormaliserManager.java:817)
    au.gov.naa.digipres.xena.kernel.normalise.NormaliserManager.normalise(NormaliserManager.java:1005)
    au.gov.naa.digipres.xena.core.Xena.normalise(Xena.java:599)
    au.gov.naa.digipres.xena.core.Xena.normalise(Xena.java:543)
    au.gov.naa.digipres.xena.litegui.NormalisationThread.normaliseFile(NormalisationThread.java:328)
    au.gov.naa.digipres.xena.litegui.NormalisationThread.normaliseStandard(NormalisationThread.java:250)
    au.gov.naa.digipres.xena.litegui.NormalisationThread.run(NormalisationThread.java:191)

    The above pbm can be converted using Convert.

    The above files are too big to add to this report so I can supply them separately.

     
  • Daniel Black

    Daniel Black - 2011-01-18

    1.
    org.im4java.core.CommandException -> NormaliserManager.java:826 - seems to be rethrowing an SAXException which makes a CommandException look odd unless there's some unintuitave exception wrapping underneath. Is this the right stacktrace here as its the same as the one below it?

    The windows output and the im4java exception seems like there is that missingfilename part in the im4java class or its usage.

    2.

    For file "image-pam.pam" and "image-yuv.yuv"
    lets remove the NormaliserManager.java:826 rethrow of the exception and see what that stacktrace is.

    ref "convert: MustSpecifyImageSize" after testing the above we'll see if this is a missing part of the im4java library or its usage.

    3.
    pbm - format marked as complete by apache (http://commons.apache.org/sanselan/formatsupport.html)
    didn't see a bug in https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&pid=12310720&sorter/field=issuekey&sorter/order=DESC
    AC can you try to use the latest sanselan libraries and report the bug if it still exists to these devs. They still seem active in the project.

     
  • Daniel Black

    Daniel Black - 2011-01-18
    • priority: 5 --> 7
    • assigned_to: matthewoliver --> acunliffe
     
  • margotc

    margotc - 2012-03-16

    Test to verify that this problem still exists

     
  • margotc

    margotc - 2012-03-16
    • assigned_to: acunliffe --> kirtic
     

Log in to post a comment.