Skip to content

Commit

Permalink
Fix leptonica issue #747
Browse files Browse the repository at this point in the history
* genImpliedFileFormat() is not returning IFF_PNM for .pbm extensions
* augmented the extension_map array
* also added mappings for .pgm and .j2k
  • Loading branch information
DanBloomberg committed Jun 14, 2024
1 parent 1e7c3a9 commit a6c2c34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/writefile.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,12 @@ static const struct ExtensionMap extension_map[] =
{ ".tif", IFF_TIFF },
{ ".tiff", IFF_TIFF },
{ ".tiffg4", IFF_TIFF_G4 },
{ ".pbm", IFF_PNM },
{ ".pgm", IFF_PNM },
{ ".pnm", IFF_PNM },
{ ".gif", IFF_GIF },
{ ".jp2", IFF_JP2 },
{ ".j2k", IFF_JP2 },
{ ".ps", IFF_PS },
{ ".pdf", IFF_LPDF },
{ ".webp", IFF_WEBP } };
Expand Down

0 comments on commit a6c2c34

Please sign in to comment.