commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Groß (JIRA) <j...@apache.org>
Subject [jira] [Commented] (IMAGING-162) BMP files with negative bitmap height are not supported
Date Sat, 21 Feb 2015 16:10:14 GMT

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

Michael Groß commented on IMAGING-162:
--------------------------------------

The proposed fix doesn't break anything for RLE-compressed BMP images. Added+executed test
cases for this.

But I am still not sure what it does if an RLE-compressed BMP image with negative height is
given because I have no example yet. (I expect the image to be read top-down = turned by 180°.)
Are RLE-compressed BMP image with negative height eve somethig which appears somewhere in
the wild? But this patch improves the existing code.

[~mgolub] Could you provide an example?

> BMP files with negative bitmap height are not supported
> -------------------------------------------------------
>
>                 Key: IMAGING-162
>                 URL: https://issues.apache.org/jira/browse/IMAGING-162
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: Format: BMP
>    Affects Versions: 1.0
>            Reporter: Myroslav Golub
>              Labels: github
>             Fix For: Review Patch
>
>         Attachments: monochrome-negative-height.bmp
>
>
> The BMP format allows for negative values of the height field in the header. This means
that the image lines are stored top-down, not bottom-up as usual (i. e. the first pixel in
the pixel array would be in the top left corner of the image, not in the bottom left as usual).
However, when a negative-height bitmap is passed, the BmpImageParser attempts to create an
array of negative length, and a NegativeArraySizeException ensues.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message