Browse Source

read support for portable any map

PBM, PGM and PPM files
Johann 6 years ago
parent
commit
25542c1550
2 changed files with 2 additions and 0 deletions
  1. 1 0
      lazpaint/dialog/ubrowseimages.pas
  2. 1 0
      lazpaint/ufileextensions.pas

+ 1 - 0
lazpaint/dialog/ubrowseimages.pas

@@ -499,6 +499,7 @@ begin
   begin
   begin
     format := SuggestImageFormat(AType);
     format := SuggestImageFormat(AType);
     if IsRawFilename('noname'+AType) then AType := 'Raw'
     if IsRawFilename('noname'+AType) then AType := 'Raw'
+    else if format = ifPortableAnyMap then AType := UTF8UpperCase(copy(AType,2,length(AType)-1))
     else if format = ifPng then AType := 'PNG' //too long to write explicitely
     else if format = ifPng then AType := 'PNG' //too long to write explicitely
     else if format = ifGIF then AType := 'GIF' //do not know if animated or not
     else if format = ifGIF then AType := 'GIF' //do not know if animated or not
     else if format = ifIco then AType := 'Icon'
     else if format = ifIco then AType := 'Icon'

+ 1 - 0
lazpaint/ufileextensions.pas

@@ -320,6 +320,7 @@ initialization
   RegisterPicExt('Targa','tga', [eoReadable,eoWritable]);
   RegisterPicExt('Targa','tga', [eoReadable,eoWritable]);
   RegisterPicExt('Tiff','tif;tiff', [eoReadable,eoWritable]);
   RegisterPicExt('Tiff','tif;tiff', [eoReadable,eoWritable]);
   RegisterPicExt('X PixMap','xpm', [eoReadable,eoWritable]);
   RegisterPicExt('X PixMap','xpm', [eoReadable,eoWritable]);
+  RegisterPicExt('Portable Any Map', 'pbm;pgm;ppm', [eoReadable]);
   RegisterPicExt('X Window','xwd', [eoReadable]);
   RegisterPicExt('X Window','xwd', [eoReadable]);
   RegisterPicExt('Raw',AllRawExtensions, [eoReadable]);
   RegisterPicExt('Raw',AllRawExtensions, [eoReadable]);