Skip to content

Unable to decode an Image #729

@frankmer

Description

@frankmer
RangeError (length): Invalid value: Not in inclusive range 0..13: 4294967295

#0   _Array.[] (dart:core-patch/array.dart)
#1   new BmpInfo (package:image/src/formats/bmp/bmp_info.dart:92:44)
#2   BmpDecoder.startDecode (package:image/src/formats/bmp_decoder.dart:34:19)
#3   BmpDecoder.decode (package:image/src/formats/bmp_decoder.dart:123:9)
#4   decodeImage (package:image/src/formats/formats.dart:233:19)

This error occurs when I try to decode an image. The header of the image is:

42 4D 4C 00 00 00 00 00
00 00 1A 00 00 00 0C 00
18 00

The filename ends with ".png" but because the header starts with BML it got recognized as BMP which header starts with BM.
My google research did not tell me what type of header this is. PNG usually starts with "89 50 4E 47 0D 0A 1A 0A" but not this one.
Every image viewer I tried was able to show me the image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions