commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IMAGING-209) PnmImageParser throws ImageWriteException when writing if PnmImageParser.PARAM_KEY_PNM_RAWBITS is provided
Date Mon, 04 Dec 2017 14:44:00 GMT

    [ https://issues.apache.org/jira/browse/IMAGING-209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16276870#comment-16276870
] 

ASF GitHub Bot commented on IMAGING-209:
----------------------------------------

GitHub user aesy opened a pull request:

    https://github.com/apache/commons-imaging/pull/33

    Imaging-209 PnmImageParser throws ImageWriteException when writing

    if PnmImageParser.PARAM_KEY_PNM_RAWBITS is provided.
    
    I fixed the issue and added a test to cover it.
    
    Issue can be found here: https://issues.apache.org/jira/browse/IMAGING-209

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/aesy/commons-imaging master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-imaging/pull/33.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #33
    
----
commit 9ab1fb1615c97aa635d660d1b41ee0776ab7e401
Author: Isak W <isak.wertwein@gmail.com>
Date:   2017-12-04T14:38:24Z

    Fix issue where PnmImageParser would throw ImageWriteException
    when writing if PnmImageParser.PARAM_KEY_PNM_RAWBITS is provided.

----


> PnmImageParser throws ImageWriteException when writing if PnmImageParser.PARAM_KEY_PNM_RAWBITS
is provided
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: IMAGING-209
>                 URL: https://issues.apache.org/jira/browse/IMAGING-209
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: Format: PNM
>            Reporter: Isak W
>
> Code sample:
> {code:java}
> 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);
> {code}
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message