Jump to content

[Solved] How to get Array from this Text Type ?


 Share

Recommended Posts

I need to get the Array from the text below! IF line exits "Mode(r/w/+/-)" otherwise this line is the description of the previous line! 

; Result:
$Array[1][0] = 3FR
$Array[1][1] = DNG
$Array[1][2] = r--
$Array[1][3] = Hasselblad CFV/H3D39II

Plain Text:

Format  Module    Mode  Description
-------------------------------------------------------------------------------
      3FR  DNG       r--   Hasselblad CFV/H3D39II
      3G2  MPEG      r--   Media Container
      3GP  MPEG      r--   Media Container
      AAI* AAI       rw+   AAI Dune image
       AI  PDF       rw-   Adobe Illustrator CS2
      ART* ART       rw-   PFS: 1st Publisher Clip Art
      ARW  DNG       r--   Sony Alpha Raw Image Format
      AVI  MPEG      r--   Microsoft Audio/Visual Interleaved
      AVS* AVS       rw+   AVS X image
      BGR* BGR       rw+   Raw blue, green, and red samples
     BGRA* BGR       rw+   Raw blue, green, red, and alpha samples
     BGRO* BGR       rw+   Raw blue, green, red, and opacity samples
      BIE* JBIG      ---   Joint Bi-level Image experts Group interchange format

      BMP* BMP       rw-   Microsoft Windows bitmap image
     BMP2* BMP       -w-   Microsoft Windows bitmap image (V2)
     BMP3* BMP       -w-   Microsoft Windows bitmap image (V3)
      BRF* BRAILLE   -w-   BRF ASCII Braille format
      CAL* CALS      rw-   Continuous Acquisition and Life-cycle Support Type 1
           Specified in MIL-R-28002 and MIL-PRF-28002
     CALS* CALS      rw-   Continuous Acquisition and Life-cycle Support Type 1
           Specified in MIL-R-28002 and MIL-PRF-28002
   CANVAS* XC        r--   Constant image uniform color
  CAPTION* CAPTION   r--   Caption
      CIN* CIN       rw-   Cineon Image File
      CIP* CIP       -w-   Cisco IP phone image format
     CLIP* CLIP      rw+   Image Clip Mask
CLIPBOARD* CLIPBOARD rw-   The system clipboard
     CMYK* CMYK      rw+   Raw cyan, magenta, yellow, and black samples
    CMYKA* CMYK      rw+   Raw cyan, magenta, yellow, black, and alpha samples
      CR2  DNG       r--   Canon Digital Camera Raw Image Format
      CRW  DNG       r--   Canon Digital Camera Raw Image Format
      CUR* ICON      rw-   Microsoft icon
      CUT* CUT       r--   DR Halo
      DCM* DCM       r--   Digital Imaging and Communications in Medicine image
           DICOM is used by the medical community for images like X-rays.  The specification, 
           'Digital Imaging and Communications in Medicine (DICOM)', is available at http://medical.nema.org/.  
           In particular, see part 5 which describes the image encoding (RLE, JPEG, JPEG-LS), and supplement 61 which adds JPEG-2000 encoding.
      DCR  DNG       r--   Kodak Digital Camera Raw Image File
      DCX* PCX       rw+   ZSoft IBM PC multi-page Paintbrush
      DDS* DDS       rw+   Microsoft DirectDraw Surface
    DFONT* TTF       r--   Multi-face font package (Freetype 2.6.3)
     DJVU* DJVU      ---   Deja vu
           See http://www.djvuzone.org/ for details about the DJVU format.  The
           DJVU 1.2 specification is available there and at ftp://swrinde.nde.swri.edu/pub/djvu/documents/.
      DNG  DNG       r--   Digital Negative
      DOT  DOT       ---   Graphviz
      DPS  DPS       ---   Display Postscript Interpreter
      DPX* DPX       rw-   SMPTE 268M-2003 (DPX 2.0)
           Digital Moving Picture Exchange Bitmap, Version 2.0.
           See SMPTE 268M-2003 specification at http://www.smtpe.org

     DXT1* DDS       rw+   Microsoft DirectDraw Surface
     DXT5* DDS       rw+   Microsoft DirectDraw Surface
      EMF  EMF       r--   Windows Enhanced Meta File
     EPDF  PDF       rw-   Encapsulated Portable Document Format
      EPI  PS        rw-   Encapsulated PostScript Interchange format
      EPS  PS        rw-   Encapsulated PostScript
     EPS2* PS2       -w-   Level II Encapsulated PostScript
     EPS3* PS3       -w+   Level III Encapsulated PostScript
     EPSF  PS        rw-   Encapsulated PostScript
     EPSI  PS        rw-   Encapsulated PostScript Interchange format
      EPT  EPT       rw-   Encapsulated PostScript with TIFF preview
     EPT2  EPT       rw-   Encapsulated PostScript Level II with TIFF preview
     EPT3  EPT       rw+   Encapsulated PostScript Level III with TIFF preview
      ERF  DNG       r--   Epson RAW Format
      EXR  EXR       rw-   High Dynamic-range (HDR)
      FAX* FAX       rw+   Group 3 FAX
           FAX machines use non-square pixels which are 1.5 times wider than they are tall but computer displays use square pixels, therefore
           FAX images may appear to be narrow unless they are explicitly resized using a geometry of 150x100%.

     FILE* URL       r--   Uniform Resource Locator (file://)
     FITS* FITS      rw-   Flexible Image Transport System
     FLIF* FLIF      rw+   Free Lossless Image Format (libflif 0.0.2 [0000])
      FPX  FPX       ---   FlashPix Format
  FRACTAL* PLASMA    r--   Plasma fractal image
      FTP* URL       r--   Uniform Resource Locator (ftp://)
      FTS* FITS      rw-   Flexible Image Transport System
       G3* FAX       rw-   Group 3 FAX
       G4* FAX       rw-   Group 4 FAX
      GIF* GIF       rw+   CompuServe graphics interchange format
    GIF87* GIF       rw-   CompuServe graphics interchange format (version 87a)
 GRADIENT* GRADIENT  r--   Gradual linear passing from one shade to another
     GRAY* GRAY      rw+   Raw gray samples
   GROUP4* TIFF      rw-   Raw CCITT Group4
       GV  DOT       ---   Graphviz
     HALD* HALD      r--   Identity Hald color lookup table image
      HDR* HDR       rw+   Radiance RGBE image format
HISTOGRAM* HISTOGRAM -w-   Histogram of the image
      HRZ* HRZ       rw-   Slow Scan TeleVision
      HTM* HTML      -w-   Hypertext Markup Language and a client-side image map

     HTML* HTML      -w-   Hypertext Markup Language and a client-side image map

     HTTP* URL       r--   Uniform Resource Locator (http://)
    HTTPS* URL       r--   Uniform Resource Locator (https://)
      ICB* TGA       rw-   Truevision Targa image
      ICO* ICON      rw+   Microsoft icon
     ICON* ICON      rw-   Microsoft icon
      IIQ  DNG       r--   Phase One Raw Image Format
     INFO  INFO      -w+   The image format and characteristics
   INLINE* INLINE    rw+   Base64-encoded inline images
      IPL* IPL       rw+   IPL Image Sequence
   ISOBRL* BRAILLE   -w-   ISO/TR 11548-1 format
  ISOBRL6* BRAILLE   -w-   ISO/TR 11548-1 format 6dot
      J2C* JP2       rw-   JPEG-2000 Code Stream Syntax (2.1.2)
      J2K* JP2       rw-   JPEG-2000 Code Stream Syntax (2.1.2)
      JBG* JBIG      ---   Joint Bi-level Image experts Group interchange format

     JBIG* JBIG      ---   Joint Bi-level Image experts Group interchange format

      JNG* PNG       rw-   JPEG Network Graphics
           See http://www.libpng.org/pub/mng/ for details about the JNG format.
      JNX* JNX       r--   Garmin tile format
      JP2* JP2       rw-   JPEG-2000 File Format Syntax (2.1.2)
      JPC* JP2       rw-   JPEG-2000 Code Stream Syntax (2.1.2)
      JPE* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)
     JPEG* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)
      JPG* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)
      JPM* JP2       rw-   JPEG-2000 File Format Syntax (2.1.2)
      JPS* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)
      JPT* JP2       rw-   JPEG-2000 File Format Syntax (2.1.2)
     JSON  JSON      -w+   The image format and characteristics
      K25  DNG       r--   Kodak Digital Camera Raw Image Format
      KDC  DNG       r--   Kodak Digital Camera Raw Image Format
    LABEL* LABEL     r--   Image label
      M2V  MPEG      rw+   MPEG Video Stream
      M4V  MPEG      rw+   Raw MPEG-4 Video
      MAC* MAC       r--   MAC Paint
      MAP* MAP       rw-   Colormap intensities and indices
     MASK* MASK      rw+   Image Clip Mask
      MAT  MAT       rw+   MATLAB level 5 image format
    MATTE* MATTE     -w+   MATTE format
      MEF  DNG       r--   Mamiya Raw Image File
     MIFF* MIFF      rw+   Magick Image File Format
      MKV  MPEG      rw+   Multimedia Container
      MNG* PNG       rw+   Multiple-image Network Graphics (libpng 1.6.26)
           See http://www.libpng.org/pub/mng/ for details about the MNG format.
     MONO* MONO      rw-   Raw bi-level bitmap
      MOV  MPEG      rw+   MPEG Video Stream
      MP4  MPEG      rw+   MPEG-4 Video Stream
      MPC* MPC       rw+   Magick Persistent Cache image format
     MPEG  MPEG      rw+   MPEG Video Stream
      MPG  MPEG      rw+   MPEG Video Stream
      MRW  DNG       r--   Sony (Minolta) Raw Image File
      MSL* MSL       rw+   Magick Scripting Language
     MSVG  SVG       rw+   ImageMagick's own SVG internal renderer
      MTV* MTV       rw+   MTV Raytracing image format
      MVG* MVG       rw-   Magick Vector Graphics
      NEF  DNG       r--   Nikon Digital SLR Camera Raw Image File
      NRW  DNG       r--   Nikon Digital SLR Camera Raw Image File
     NULL* NULL      rw-   Constant image of uniform color
      ORF  DNG       r--   Olympus Digital Camera Raw Image File
      OTB* OTB       rw-   On-the-air bitmap
      OTF* TTF       r--   Open Type font (Freetype 2.6.3)
      PAL* UYVY      rw-   16bit/pixel interleaved YUV
     PALM* PALM      rw+   Palm pixmap
      PAM* PNM       rw+   Common 2-dimensional bitmap format
    PANGO* PANGO     r--   Pango Markup Language (Pangocairo 1.40.1)
  PATTERN* PATTERN   r--   Predefined pattern
      PBM* PNM       rw+   Portable bitmap format (black and white)
      PCD* PCD       rw-   Photo CD
     PCDS* PCD       rw-   Photo CD
      PCL  PCL       rw+   Printer Control Language
      PCT* PICT      rw-   Apple Macintosh QuickDraw/PICT
      PCX* PCX       rw-   ZSoft IBM PC Paintbrush
      PDB* PDB       rw+   Palm Database ImageViewer Format
      PDF  PDF       rw+   Portable Document Format
     PDFA  PDF       rw+   Portable Document Archive Format
      PEF  DNG       r--   Pentax Electronic File
      PES* PES       r--   Embrid Embroidery Format
      PFA* TTF       r--   Postscript Type 1 font (ASCII) (Freetype 2.6.3)
      PFB* TTF       r--   Postscript Type 1 font (binary) (Freetype 2.6.3)
      PFM* PNM       rw+   Portable float format
      PGM* PNM       rw+   Portable graymap format (gray scale)
    PICON* XPM       rw-   Personal Icon
     PICT* PICT      rw-   Apple Macintosh QuickDraw/PICT
      PIX* PIX       r--   Alias/Wavefront RLE image format
    PJPEG* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)
   PLASMA* PLASMA    r--   Plasma fractal image
      PNG* PNG       rw-   Portable Network Graphics (libpng 1.6.26)
           See http://www.libpng.org/ for details about the PNG format.
    PNG00* PNG       rw-   PNG inheriting bit-depth, color-type from original, if possible
    PNG24* PNG       rw-   opaque or binary transparent 24-bit RGB (zlib 1.2.9)
    PNG32* PNG       rw-   opaque or transparent 32-bit RGBA
    PNG48* PNG       rw-   opaque or binary transparent 48-bit RGB
    PNG64* PNG       rw-   opaque or transparent 64-bit RGBA
     PNG8* PNG       rw-   8-bit indexed with optional binary transparency
      PNM* PNM       rw+   Portable anymap
      PPM* PNM       rw+   Portable pixmap format (color)
       PS  PS        rw+   PostScript
      PS2* PS2       -w+   Level II PostScript
      PS3* PS3       -w+   Level III PostScript
      PSB* PSD       rw+   Adobe Large Document Format
      PSD* PSD       rw+   Adobe Photoshop bitmap
     PTIF* TIFF      rw+   Pyramid encoded TIFF
      PWP* PWP       r--   Seattle Film Works
RADIAL-GRADIENT* GRADIENT  r--   Gradual radial passing from one shade to another
      RAF  DNG       r--   Fuji CCD-RAW Graphic File
      RAS* SUN       rw+   SUN Rasterfile
      RAW  DNG       r--   Raw
      RGB* RGB       rw+   Raw red, green, and blue samples
     RGBA* RGB       rw+   Raw red, green, blue, and alpha samples
     RGBO* RGB       rw+   Raw red, green, blue, and opacity samples
      RGF* RGF       rw-   LEGO Mindstorms EV3 Robot Graphic Format (black and w
      SGI* SGI       rw+   Irix RGB image
      SIX* SIX       rw-   DEC SIXEL Graphics Format
    SIXEL* SIXEL     rw-   DEC SIXEL Graphics Format
      SUN* SUN       rw+   SUN Rasterfile
      SVG  SVG       rw+   Scalable Vector Graphics (RSVG 2.40.15)
     SVGZ  SVG       rw+   Compressed Scalable Vector Graphics (RSVG 2.40.15)
      TGA* TGA       rw-   Truevision Targa image
THUMBNAIL* THUMBNAIL -w+   EXIF Profile Thumbnail
     TIFF* TIFF      rw+   Tagged Image File Format (LIBTIFF, Version 4.0.7)
   TIFF64* TIFF      rw-   Tagged Image File Format (64-bit) (LIBTIFF, Version 4
      TXT* TXT       rw+   Text
     UYVY* UYVY      rw-   16bit/pixel interleaved YUV
      VDA* TGA       rw-   Truevision Targa image
    VICAR* VICAR     rw-   VICAR rasterfile format
      VID* VID       rw+   Visual Image Directory
     VIFF* VIFF      rw+   Khoros Visualization image
     VIPS* VIPS      rw+   VIPS image
      VST* TGA       rw-   Truevision Targa image
     WBMP* WBMP      rw-   Wireless Bitmap (level 0) image
     WEBP* WEBP      rw-   WebP Image Format (libwebp 0.5.1 [0208])
      WMV  MPEG      rw+   Windows Media Video
      XBM* XBM       rw-   X Windows system bitmap (black and white)
      XPM* XPM       rw-   X Windows system pixmap (color)
       XV* VIFF      rw+   Khoros Visualization image
    YCbCr* YCbCr     rw+   Raw Y, Cb, and Cr samples
   YCbCrA* YCbCr     rw+   Raw Y, Cb, Cr, and alpha samples

 

Thank you very much! Danyfirex
Saludos

 

Edited by Trong
Solved by Danyfirex

Regards,
 

Link to comment
Share on other sites

Hello. just for fun.

 

#include <Array.au3>
#include <StringConstants.au3>

Local $iTypeSupport = "   Format  Module    Mode  Description" & @CRLF
$iTypeSupport &= "-------------------------------------------------------------------------------" & @CRLF
$iTypeSupport &= "      3FR  DNG       r--   Hasselblad CFV/H3D39II" & @CRLF
$iTypeSupport &= "      3G2  MPEG      r--   Media Container" & @CRLF
$iTypeSupport &= "      3GP  MPEG      r--   Media Container" & @CRLF
$iTypeSupport &= "      AAI* AAI       rw+   AAI Dune image" & @CRLF
$iTypeSupport &= "       AI  PDF       rw-   Adobe Illustrator CS2" & @CRLF
$iTypeSupport &= "      ART* ART       rw-   PFS: 1st Publisher Clip Art" & @CRLF
$iTypeSupport &= "      ARW  DNG       r--   Sony Alpha Raw Image Format" & @CRLF
$iTypeSupport &= "      AVI  MPEG      r--   Microsoft Audio/Visual Interleaved" & @CRLF
$iTypeSupport &= "      AVS* AVS       rw+   AVS X image" & @CRLF
$iTypeSupport &= "      BGR* BGR       rw+   Raw blue, green, and red samples" & @CRLF
$iTypeSupport &= "     BGRA* BGR       rw+   Raw blue, green, red, and alpha samples" & @CRLF
$iTypeSupport &= "     BGRO* BGR       rw+   Raw blue, green, red, and opacity samples" & @CRLF
$iTypeSupport &= "      BIE* JBIG      ---   Joint Bi-level Image experts Group interchange format" & @CRLF
$iTypeSupport &= "" & @CRLF
$iTypeSupport &= "      BMP* BMP       rw-   Microsoft Windows bitmap image" & @CRLF
$iTypeSupport &= "     BMP2* BMP       -w-   Microsoft Windows bitmap image (V2)" & @CRLF
$iTypeSupport &= "     BMP3* BMP       -w-   Microsoft Windows bitmap image (V3)" & @CRLF
$iTypeSupport &= "      BRF* BRAILLE   -w-   BRF ASCII Braille format" & @CRLF
$iTypeSupport &= "      CAL* CALS      rw-   Continuous Acquisition and Life-cycle Support Type 1" & @CRLF
$iTypeSupport &= "           Specified in MIL-R-28002 and MIL-PRF-28002" & @CRLF
$iTypeSupport &= "     CALS* CALS      rw-   Continuous Acquisition and Life-cycle Support Type 1" & @CRLF
$iTypeSupport &= "           Specified in MIL-R-28002 and MIL-PRF-28002" & @CRLF
$iTypeSupport &= "   CANVAS* XC        r--   Constant image uniform color" & @CRLF
$iTypeSupport &= "  CAPTION* CAPTION   r--   Caption" & @CRLF
$iTypeSupport &= "      CIN* CIN       rw-   Cineon Image File" & @CRLF
$iTypeSupport &= "      CIP* CIP       -w-   Cisco IP phone image format" & @CRLF
$iTypeSupport &= "     CLIP* CLIP      rw+   Image Clip Mask" & @CRLF
$iTypeSupport &= "CLIPBOARD* CLIPBOARD rw-   The system clipboard" & @CRLF
$iTypeSupport &= "     CMYK* CMYK      rw+   Raw cyan, magenta, yellow, and black samples" & @CRLF
$iTypeSupport &= "    CMYKA* CMYK      rw+   Raw cyan, magenta, yellow, black, and alpha samples" & @CRLF
$iTypeSupport &= "      CR2  DNG       r--   Canon Digital Camera Raw Image Format" & @CRLF
$iTypeSupport &= "      CRW  DNG       r--   Canon Digital Camera Raw Image Format" & @CRLF
$iTypeSupport &= "      CUR* ICON      rw-   Microsoft icon" & @CRLF
$iTypeSupport &= "      CUT* CUT       r--   DR Halo" & @CRLF
$iTypeSupport &= "      DCM* DCM       r--   Digital Imaging and Communications in Medicine image" & @CRLF
$iTypeSupport &= "           DICOM is used by the medical community for images like X-rays.  The specification, " & @CRLF
$iTypeSupport &= "           'Digital Imaging and Communications in Medicine (DICOM)', is available at http://medical.nema.org/.  " & @CRLF
$iTypeSupport &= "           In particular, see part 5 which describes the image encoding (RLE, JPEG, JPEG-LS), and supplement 61 which adds JPEG-2000 encoding." & @CRLF
$iTypeSupport &= "      DCR  DNG       r--   Kodak Digital Camera Raw Image File" & @CRLF
$iTypeSupport &= "      DCX* PCX       rw+   ZSoft IBM PC multi-page Paintbrush" & @CRLF
$iTypeSupport &= "      DDS* DDS       rw+   Microsoft DirectDraw Surface" & @CRLF
$iTypeSupport &= "    DFONT* TTF       r--   Multi-face font package (Freetype 2.6.3)" & @CRLF
$iTypeSupport &= "     DJVU* DJVU      ---   Deja vu" & @CRLF
$iTypeSupport &= "           See http://www.djvuzone.org/ for details about the DJVU format.  The" & @CRLF
$iTypeSupport &= "           DJVU 1.2 specification is available there and at ftp://swrinde.nde.swri.edu/pub/djvu/documents/." & @CRLF
$iTypeSupport &= "      DNG  DNG       r--   Digital Negative" & @CRLF
$iTypeSupport &= "      DOT  DOT       ---   Graphviz" & @CRLF
$iTypeSupport &= "      DPS  DPS       ---   Display Postscript Interpreter" & @CRLF
$iTypeSupport &= "      DPX* DPX       rw-   SMPTE 268M-2003 (DPX 2.0)" & @CRLF
$iTypeSupport &= "           Digital Moving Picture Exchange Bitmap, Version 2.0." & @CRLF
$iTypeSupport &= "           See SMPTE 268M-2003 specification at http://www.smtpe.org" & @CRLF
$iTypeSupport &= "" & @CRLF
$iTypeSupport &= "     DXT1* DDS       rw+   Microsoft DirectDraw Surface" & @CRLF
$iTypeSupport &= "     DXT5* DDS       rw+   Microsoft DirectDraw Surface" & @CRLF
$iTypeSupport &= "      EMF  EMF       r--   Windows Enhanced Meta File" & @CRLF
$iTypeSupport &= "     EPDF  PDF       rw-   Encapsulated Portable Document Format" & @CRLF
$iTypeSupport &= "      EPI  PS        rw-   Encapsulated PostScript Interchange format" & @CRLF
$iTypeSupport &= "      EPS  PS        rw-   Encapsulated PostScript" & @CRLF
$iTypeSupport &= "     EPS2* PS2       -w-   Level II Encapsulated PostScript" & @CRLF
$iTypeSupport &= "     EPS3* PS3       -w+   Level III Encapsulated PostScript" & @CRLF
$iTypeSupport &= "     EPSF  PS        rw-   Encapsulated PostScript" & @CRLF
$iTypeSupport &= "     EPSI  PS        rw-   Encapsulated PostScript Interchange format" & @CRLF
$iTypeSupport &= "      EPT  EPT       rw-   Encapsulated PostScript with TIFF preview" & @CRLF
$iTypeSupport &= "     EPT2  EPT       rw-   Encapsulated PostScript Level II with TIFF preview" & @CRLF
$iTypeSupport &= "     EPT3  EPT       rw+   Encapsulated PostScript Level III with TIFF preview" & @CRLF
$iTypeSupport &= "      ERF  DNG       r--   Epson RAW Format" & @CRLF
$iTypeSupport &= "      EXR  EXR       rw-   High Dynamic-range (HDR)" & @CRLF
$iTypeSupport &= "      FAX* FAX       rw+   Group 3 FAX" & @CRLF
$iTypeSupport &= "           FAX machines use non-square pixels which are 1.5 times wider than they are tall but computer displays use square pixels, therefore" & @CRLF
$iTypeSupport &= "           FAX images may appear to be narrow unless they are explicitly resized using a geometry of 150x100%." & @CRLF
$iTypeSupport &= "" & @CRLF
$iTypeSupport &= "     FILE* URL       r--   Uniform Resource Locator (file://)" & @CRLF
$iTypeSupport &= "     FITS* FITS      rw-   Flexible Image Transport System" & @CRLF
$iTypeSupport &= "     FLIF* FLIF      rw+   Free Lossless Image Format (libflif 0.0.2 [0000])" & @CRLF
$iTypeSupport &= "      FPX  FPX       ---   FlashPix Format" & @CRLF
$iTypeSupport &= "  FRACTAL* PLASMA    r--   Plasma fractal image" & @CRLF
$iTypeSupport &= "      FTP* URL       r--   Uniform Resource Locator (ftp://)" & @CRLF
$iTypeSupport &= "      FTS* FITS      rw-   Flexible Image Transport System" & @CRLF
$iTypeSupport &= "       G3* FAX       rw-   Group 3 FAX" & @CRLF
$iTypeSupport &= "       G4* FAX       rw-   Group 4 FAX" & @CRLF
$iTypeSupport &= "      GIF* GIF       rw+   CompuServe graphics interchange format" & @CRLF
$iTypeSupport &= "    GIF87* GIF       rw-   CompuServe graphics interchange format (version 87a)" & @CRLF
$iTypeSupport &= " GRADIENT* GRADIENT  r--   Gradual linear passing from one shade to another" & @CRLF
$iTypeSupport &= "     GRAY* GRAY      rw+   Raw gray samples" & @CRLF
$iTypeSupport &= "   GROUP4* TIFF      rw-   Raw CCITT Group4" & @CRLF
$iTypeSupport &= "       GV  DOT       ---   Graphviz" & @CRLF
$iTypeSupport &= "     HALD* HALD      r--   Identity Hald color lookup table image" & @CRLF
$iTypeSupport &= "      HDR* HDR       rw+   Radiance RGBE image format" & @CRLF
$iTypeSupport &= "HISTOGRAM* HISTOGRAM -w-   Histogram of the image" & @CRLF
$iTypeSupport &= "      HRZ* HRZ       rw-   Slow Scan TeleVision" & @CRLF
$iTypeSupport &= "      HTM* HTML      -w-   Hypertext Markup Language and a client-side image map" & @CRLF
$iTypeSupport &= "" & @CRLF
$iTypeSupport &= "     HTML* HTML      -w-   Hypertext Markup Language and a client-side image map" & @CRLF
$iTypeSupport &= "" & @CRLF
$iTypeSupport &= "     HTTP* URL       r--   Uniform Resource Locator (http://)" & @CRLF
$iTypeSupport &= "    HTTPS* URL       r--   Uniform Resource Locator (https://)" & @CRLF
$iTypeSupport &= "      ICB* TGA       rw-   Truevision Targa image" & @CRLF
$iTypeSupport &= "      ICO* ICON      rw+   Microsoft icon" & @CRLF
$iTypeSupport &= "     ICON* ICON      rw-   Microsoft icon" & @CRLF
$iTypeSupport &= "      IIQ  DNG       r--   Phase One Raw Image Format" & @CRLF
$iTypeSupport &= "     INFO  INFO      -w+   The image format and characteristics" & @CRLF
$iTypeSupport &= "   INLINE* INLINE    rw+   Base64-encoded inline images" & @CRLF
$iTypeSupport &= "      IPL* IPL       rw+   IPL Image Sequence" & @CRLF
$iTypeSupport &= "   ISOBRL* BRAILLE   -w-   ISO/TR 11548-1 format" & @CRLF
$iTypeSupport &= "  ISOBRL6* BRAILLE   -w-   ISO/TR 11548-1 format 6dot" & @CRLF
$iTypeSupport &= "      J2C* JP2       rw-   JPEG-2000 Code Stream Syntax (2.1.2)" & @CRLF
$iTypeSupport &= "      J2K* JP2       rw-   JPEG-2000 Code Stream Syntax (2.1.2)" & @CRLF
$iTypeSupport &= "      JBG* JBIG      ---   Joint Bi-level Image experts Group interchange format" & @CRLF
$iTypeSupport &= "" & @CRLF
$iTypeSupport &= "     JBIG* JBIG      ---   Joint Bi-level Image experts Group interchange format" & @CRLF
$iTypeSupport &= "" & @CRLF
$iTypeSupport &= "      JNG* PNG       rw-   JPEG Network Graphics" & @CRLF
$iTypeSupport &= "           See http://www.libpng.org/pub/mng/ for details about the JNG format." & @CRLF
$iTypeSupport &= "      JNX* JNX       r--   Garmin tile format" & @CRLF
$iTypeSupport &= "      JP2* JP2       rw-   JPEG-2000 File Format Syntax (2.1.2)" & @CRLF
$iTypeSupport &= "      JPC* JP2       rw-   JPEG-2000 Code Stream Syntax (2.1.2)" & @CRLF
$iTypeSupport &= "      JPE* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)" & @CRLF
$iTypeSupport &= "     JPEG* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)" & @CRLF
$iTypeSupport &= "      JPG* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)" & @CRLF
$iTypeSupport &= "      JPM* JP2       rw-   JPEG-2000 File Format Syntax (2.1.2)" & @CRLF
$iTypeSupport &= "      JPS* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)" & @CRLF
$iTypeSupport &= "      JPT* JP2       rw-   JPEG-2000 File Format Syntax (2.1.2)" & @CRLF
$iTypeSupport &= "     JSON  JSON      -w+   The image format and characteristics" & @CRLF
$iTypeSupport &= "      K25  DNG       r--   Kodak Digital Camera Raw Image Format" & @CRLF
$iTypeSupport &= "      KDC  DNG       r--   Kodak Digital Camera Raw Image Format" & @CRLF
$iTypeSupport &= "    LABEL* LABEL     r--   Image label" & @CRLF
$iTypeSupport &= "      M2V  MPEG      rw+   MPEG Video Stream" & @CRLF
$iTypeSupport &= "      M4V  MPEG      rw+   Raw MPEG-4 Video" & @CRLF
$iTypeSupport &= "      MAC* MAC       r--   MAC Paint" & @CRLF
$iTypeSupport &= "      MAP* MAP       rw-   Colormap intensities and indices" & @CRLF
$iTypeSupport &= "     MASK* MASK      rw+   Image Clip Mask" & @CRLF
$iTypeSupport &= "      MAT  MAT       rw+   MATLAB level 5 image format" & @CRLF
$iTypeSupport &= "    MATTE* MATTE     -w+   MATTE format" & @CRLF
$iTypeSupport &= "      MEF  DNG       r--   Mamiya Raw Image File" & @CRLF
$iTypeSupport &= "     MIFF* MIFF      rw+   Magick Image File Format" & @CRLF
$iTypeSupport &= "      MKV  MPEG      rw+   Multimedia Container" & @CRLF
$iTypeSupport &= "      MNG* PNG       rw+   Multiple-image Network Graphics (libpng 1.6.26)" & @CRLF
$iTypeSupport &= "           See http://www.libpng.org/pub/mng/ for details about the MNG format." & @CRLF
$iTypeSupport &= "     MONO* MONO      rw-   Raw bi-level bitmap" & @CRLF
$iTypeSupport &= "      MOV  MPEG      rw+   MPEG Video Stream" & @CRLF
$iTypeSupport &= "      MP4  MPEG      rw+   MPEG-4 Video Stream" & @CRLF
$iTypeSupport &= "      MPC* MPC       rw+   Magick Persistent Cache image format" & @CRLF
$iTypeSupport &= "     MPEG  MPEG      rw+   MPEG Video Stream" & @CRLF
$iTypeSupport &= "      MPG  MPEG      rw+   MPEG Video Stream" & @CRLF
$iTypeSupport &= "      MRW  DNG       r--   Sony (Minolta) Raw Image File" & @CRLF
$iTypeSupport &= "      MSL* MSL       rw+   Magick Scripting Language" & @CRLF
$iTypeSupport &= "     MSVG  SVG       rw+   ImageMagick's own SVG internal renderer" & @CRLF
$iTypeSupport &= "      MTV* MTV       rw+   MTV Raytracing image format" & @CRLF
$iTypeSupport &= "      MVG* MVG       rw-   Magick Vector Graphics" & @CRLF
$iTypeSupport &= "      NEF  DNG       r--   Nikon Digital SLR Camera Raw Image File" & @CRLF
$iTypeSupport &= "      NRW  DNG       r--   Nikon Digital SLR Camera Raw Image File" & @CRLF
$iTypeSupport &= "     NULL* NULL      rw-   Constant image of uniform color" & @CRLF
$iTypeSupport &= "      ORF  DNG       r--   Olympus Digital Camera Raw Image File" & @CRLF
$iTypeSupport &= "      OTB* OTB       rw-   On-the-air bitmap" & @CRLF
$iTypeSupport &= "      OTF* TTF       r--   Open Type font (Freetype 2.6.3)" & @CRLF
$iTypeSupport &= "      PAL* UYVY      rw-   16bit/pixel interleaved YUV" & @CRLF
$iTypeSupport &= "     PALM* PALM      rw+   Palm pixmap" & @CRLF
$iTypeSupport &= "      PAM* PNM       rw+   Common 2-dimensional bitmap format" & @CRLF
$iTypeSupport &= "    PANGO* PANGO     r--   Pango Markup Language (Pangocairo 1.40.1)" & @CRLF
$iTypeSupport &= "  PATTERN* PATTERN   r--   Predefined pattern" & @CRLF
$iTypeSupport &= "      PBM* PNM       rw+   Portable bitmap format (black and white)" & @CRLF
$iTypeSupport &= "      PCD* PCD       rw-   Photo CD" & @CRLF
$iTypeSupport &= "     PCDS* PCD       rw-   Photo CD" & @CRLF
$iTypeSupport &= "      PCL  PCL       rw+   Printer Control Language" & @CRLF
$iTypeSupport &= "      PCT* PICT      rw-   Apple Macintosh QuickDraw/PICT" & @CRLF
$iTypeSupport &= "      PCX* PCX       rw-   ZSoft IBM PC Paintbrush" & @CRLF
$iTypeSupport &= "      PDB* PDB       rw+   Palm Database ImageViewer Format" & @CRLF
$iTypeSupport &= "      PDF  PDF       rw+   Portable Document Format" & @CRLF
$iTypeSupport &= "     PDFA  PDF       rw+   Portable Document Archive Format" & @CRLF
$iTypeSupport &= "      PEF  DNG       r--   Pentax Electronic File" & @CRLF
$iTypeSupport &= "      PES* PES       r--   Embrid Embroidery Format" & @CRLF
$iTypeSupport &= "      PFA* TTF       r--   Postscript Type 1 font (ASCII) (Freetype 2.6.3)" & @CRLF
$iTypeSupport &= "      PFB* TTF       r--   Postscript Type 1 font (binary) (Freetype 2.6.3)" & @CRLF
$iTypeSupport &= "      PFM* PNM       rw+   Portable float format" & @CRLF
$iTypeSupport &= "      PGM* PNM       rw+   Portable graymap format (gray scale)" & @CRLF
$iTypeSupport &= "    PICON* XPM       rw-   Personal Icon" & @CRLF
$iTypeSupport &= "     PICT* PICT      rw-   Apple Macintosh QuickDraw/PICT" & @CRLF
$iTypeSupport &= "      PIX* PIX       r--   Alias/Wavefront RLE image format" & @CRLF
$iTypeSupport &= "    PJPEG* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)" & @CRLF
$iTypeSupport &= "   PLASMA* PLASMA    r--   Plasma fractal image" & @CRLF
$iTypeSupport &= "      PNG* PNG       rw-   Portable Network Graphics (libpng 1.6.26)" & @CRLF
$iTypeSupport &= "           See http://www.libpng.org/ for details about the PNG format." & @CRLF
$iTypeSupport &= "    PNG00* PNG       rw-   PNG inheriting bit-depth, color-type from original, if possible" & @CRLF
$iTypeSupport &= "    PNG24* PNG       rw-   opaque or binary transparent 24-bit RGB (zlib 1.2.9)" & @CRLF
$iTypeSupport &= "    PNG32* PNG       rw-   opaque or transparent 32-bit RGBA" & @CRLF
$iTypeSupport &= "    PNG48* PNG       rw-   opaque or binary transparent 48-bit RGB" & @CRLF
$iTypeSupport &= "    PNG64* PNG       rw-   opaque or transparent 64-bit RGBA" & @CRLF
$iTypeSupport &= "     PNG8* PNG       rw-   8-bit indexed with optional binary transparency" & @CRLF
$iTypeSupport &= "      PNM* PNM       rw+   Portable anymap" & @CRLF
$iTypeSupport &= "      PPM* PNM       rw+   Portable pixmap format (color)" & @CRLF
$iTypeSupport &= "       PS  PS        rw+   PostScript" & @CRLF
$iTypeSupport &= "      PS2* PS2       -w+   Level II PostScript" & @CRLF
$iTypeSupport &= "      PS3* PS3       -w+   Level III PostScript" & @CRLF
$iTypeSupport &= "      PSB* PSD       rw+   Adobe Large Document Format" & @CRLF
$iTypeSupport &= "      PSD* PSD       rw+   Adobe Photoshop bitmap" & @CRLF
$iTypeSupport &= "     PTIF* TIFF      rw+   Pyramid encoded TIFF" & @CRLF
$iTypeSupport &= "      PWP* PWP       r--   Seattle Film Works" & @CRLF
$iTypeSupport &= "RADIAL-GRADIENT* GRADIENT  r--   Gradual radial passing from one shade to another" & @CRLF
$iTypeSupport &= "      RAF  DNG       r--   Fuji CCD-RAW Graphic File" & @CRLF
$iTypeSupport &= "      RAS* SUN       rw+   SUN Rasterfile" & @CRLF
$iTypeSupport &= "      RAW  DNG       r--   Raw" & @CRLF
$iTypeSupport &= "      RGB* RGB       rw+   Raw red, green, and blue samples" & @CRLF
$iTypeSupport &= "     RGBA* RGB       rw+   Raw red, green, blue, and alpha samples" & @CRLF
$iTypeSupport &= "     RGBO* RGB       rw+   Raw red, green, blue, and opacity samples" & @CRLF
$iTypeSupport &= "      RGF* RGF       rw-   LEGO Mindstorms EV3 Robot Graphic Format (black and w" & @CRLF
$iTypeSupport &= "      SGI* SGI       rw+   Irix RGB image" & @CRLF
$iTypeSupport &= "      SIX* SIX       rw-   DEC SIXEL Graphics Format" & @CRLF
$iTypeSupport &= "    SIXEL* SIXEL     rw-   DEC SIXEL Graphics Format" & @CRLF
$iTypeSupport &= "      SUN* SUN       rw+   SUN Rasterfile" & @CRLF
$iTypeSupport &= "      SVG  SVG       rw+   Scalable Vector Graphics (RSVG 2.40.15)" & @CRLF
$iTypeSupport &= "     SVGZ  SVG       rw+   Compressed Scalable Vector Graphics (RSVG 2.40.15)" & @CRLF
$iTypeSupport &= "      TGA* TGA       rw-   Truevision Targa image" & @CRLF
$iTypeSupport &= "THUMBNAIL* THUMBNAIL -w+   EXIF Profile Thumbnail" & @CRLF
$iTypeSupport &= "     TIFF* TIFF      rw+   Tagged Image File Format (LIBTIFF, Version 4.0.7)" & @CRLF
$iTypeSupport &= "   TIFF64* TIFF      rw-   Tagged Image File Format (64-bit) (LIBTIFF, Version 4" & @CRLF
$iTypeSupport &= "      TXT* TXT       rw+   Text" & @CRLF
$iTypeSupport &= "     UYVY* UYVY      rw-   16bit/pixel interleaved YUV" & @CRLF
$iTypeSupport &= "      VDA* TGA       rw-   Truevision Targa image" & @CRLF
$iTypeSupport &= "    VICAR* VICAR     rw-   VICAR rasterfile format" & @CRLF
$iTypeSupport &= "      VID* VID       rw+   Visual Image Directory" & @CRLF
$iTypeSupport &= "     VIFF* VIFF      rw+   Khoros Visualization image" & @CRLF
$iTypeSupport &= "     VIPS* VIPS      rw+   VIPS image" & @CRLF
$iTypeSupport &= "      VST* TGA       rw-   Truevision Targa image" & @CRLF
$iTypeSupport &= "     WBMP* WBMP      rw-   Wireless Bitmap (level 0) image" & @CRLF
$iTypeSupport &= "     WEBP* WEBP      rw-   WebP Image Format (libwebp 0.5.1 [0208])" & @CRLF
$iTypeSupport &= "      WMV  MPEG      rw+   Windows Media Video" & @CRLF
$iTypeSupport &= "      XBM* XBM       rw-   X Windows system bitmap (black and white)" & @CRLF
$iTypeSupport &= "      XPM* XPM       rw-   X Windows system pixmap (color)" & @CRLF
$iTypeSupport &= "       XV* VIFF      rw+   Khoros Visualization image" & @CRLF
$iTypeSupport &= "    YCbCr* YCbCr     rw+   Raw Y, Cb, and Cr samples" & @CRLF
$iTypeSupport &= "   YCbCrA* YCbCr     rw+   Raw Y, Cb, Cr, and alpha samples" & @CRLF & @CRLF


Local $aSplit = StringSplit($iTypeSupport, @CRLF, 1)
;~ _ArrayDisplay($aSplit)
Local $sString = ""
Local $sMode = ""

Local $aArray[0][4]

For $i = 3 To $aSplit[0]
    $sString = StringStripWS($aSplit[$i], $STR_STRIPLEADING + $STR_STRIPTRAILING + $STR_STRIPSPACES)
    $sMode = StringMid($sString, StringInStr($sString, " ", 0, 2) + 1, 3) ;Get mode ---
    If _IsValid($sMode) Then
        ConsoleWrite(">" & $sMode & @CRLF)
        ConsoleWrite($sString & @CRLF)
        _ArrayAdd($aArray, StringReplace($sString, ' ', '|', 3))
    Else
        ConsoleWrite("!Is Part of description: " & $sString & @CRLF)
        $aArray[UBound($aArray)-1][3] &= ' ' & $sString
    EndIf
Next

_ArrayDisplay($aArray)

Func _IsValid($sMode)
    Local $iFlagCount = 0
    Local $aSplit = StringSplit($sMode, "")
    If $aSplit[0] = 3 Then
        If $aSplit[1] == '-' Or $aSplit[1] == 'r' Then $iFlagCount += 1
        If $aSplit[2] == '-' Or $aSplit[2] == 'w' Then $iFlagCount += 1
        If $aSplit[3] == '-' Or $aSplit[3] == '+' Then $iFlagCount += 1
    EndIf
    Return ($iFlagCount = 3)
EndFunc   ;==>_IsValid

Saludos

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...