/* Rexx */                                            /* R-5 */                                           /* Selene */

ImageFromFile ->                                      ImageFromFile ->                                    image-from-file = file-name + img ->
Arg Image : &Array : Integer : 2^8,                   Arg Image : &Array : Integer : 2^8,                   if bmp IS_PM_BITMAP
    File_name : String                                    File_name : String                                   ' bmp = char-in file-name ->
                                                                                                              img = bmp
If BMP, IS_PM_BITMAP                                  If BMP, IS_PM_BITMAP                                  else
   With BMP from CharIn >BMP< File_name then             ' BMP - CharIn >BMP< File_name then                  img = convert bmp
 Image = BMP                                           Image = BMP                                          ;
Else                                                  Else                                                _
 - Convert >Image< BMP                                 - Convert >Image< BMP                                img : array : integer : 2^8
;                                                     ;                                                   ;

Return                                                /

FileFormat : -a ->                                    FileFormat : -a ->                                  file-format -a = bytes IS_PM_BITMAP ->
Arg Bytes : Array : Integer : 2^8,                    Arg Bytes : Array : Integer : 2^8,                    [ bytes.1 = 'B' &&
    . : IS_PM_BITMAP                                      . : IS_PM_BITMAP                                    bytes.2 = 'M' &&
                                                                                                              bytes.3 = 'N' && bytes.4 = "\0" ]
When Bytes.1 = 'B' &&                                 [ Bytes.1 = 'B' &&                                  _
     Bytes.2 = 'M' &&                                   Bytes.2 = 'M' &&                                    bytes : array : integer : 2^8
     Bytes.3 = 'N' && Bytes.4 = "\0" then               Bytes.3 = 'N' && Bytes.4 = "\0" ]                 ;
Return 1
                                                      /
Else
Return 0
