Uploaded image for project: 'Commons Imaging'
  1. Commons Imaging
  2. IMAGING-209

PnmImageParser throws ImageWriteException when writing if PnmImageParser.PARAM_KEY_PNM_RAWBITS is provided

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-alpha1
    • Format: PNM
    • None

    Description

      Code sample:

      Map<String, Object> params = new HashMap<>();
      params.put(PnmImageParser.PARAM_KEY_PNM_RAWBITS, PnmImageParser.PARAM_VALUE_PNM_RAWBITS_YES);
      Imaging.writeImage(image, file, ImageFormats.PNM, params);
      

      Error message is: "Unknown parameter: PNM_RAWBITS:

      This happens because used parameters are cleared from the map after usage and any remaining parameters are determined to be unknown, but PnmImageParser.PARAM_KEY_PNM_RAWBITS is never cleared.

      I will provide a patch on Github shortly.

      Attachments

        Issue Links

          Activity

            People

              kinow Bruno P. Kinoshita
              easypeasy Isak W
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: