Changeset 11590

Show
Ignore:
Timestamp:
07/07/08 17:19:24 (6 weeks ago)
Author:
cristy
Message:
 
Location:
ImageMagick/trunk
Files:
18 modified

Legend:

Unmodified
Added
Removed
  • ImageMagick/trunk/coders/caption.c

    r11047 r11590  
    244244  entry->decoder=(DecodeImageHandler *) ReadCAPTIONImage; 
    245245  entry->adjoin=MagickFalse; 
     246  entry->format_type=ExplicitFormatType; 
    246247  entry->description=ConstantString("Image caption"); 
    247248  entry->module=ConstantString("CAPTION"); 
  • ImageMagick/trunk/coders/clipboard.c

    r11047 r11590  
    261261#endif 
    262262  entry->adjoin=MagickFalse; 
     263  entry->format_type=ImplicitFormatType; 
    263264  entry->description=ConstantString("The system clipboard"); 
    264265  entry->module=ConstantString("CLIPBOARD"); 
  • ImageMagick/trunk/coders/dng.c

    r11589 r11590  
    231231  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    232232  entry->blob_support=MagickFalse; 
     233  entry->format_type=ExplicitFormatType; 
    233234  entry->description=ConstantString("Sony Alpha Raw Image Format"); 
    234235  entry->module=ConstantString("DNG"); 
     
    237238  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    238239  entry->blob_support=MagickFalse; 
     240  entry->format_type=ExplicitFormatType; 
    239241  entry->description=ConstantString("Digital Negative"); 
    240242  entry->module=ConstantString("DNG"); 
     
    243245  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    244246  entry->blob_support=MagickFalse; 
     247  entry->format_type=ExplicitFormatType; 
    245248  entry->description=ConstantString("Canon Digital Camera Raw Image Format"); 
    246249  entry->module=ConstantString("DNG"); 
     
    249252  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    250253  entry->blob_support=MagickFalse; 
     254  entry->format_type=ExplicitFormatType; 
    251255  entry->description=ConstantString("Canon Digital Camera Raw Image Format"); 
    252256  entry->module=ConstantString("DNG"); 
     
    255259  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    256260  entry->blob_support=MagickFalse; 
     261  entry->format_type=ExplicitFormatType; 
    257262  entry->description=ConstantString("Kodak Digital Camera Raw Image File"); 
    258263  entry->module=ConstantString("DNG"); 
     
    261266  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    262267  entry->blob_support=MagickFalse; 
     268  entry->format_type=ExplicitFormatType; 
    263269  entry->description=ConstantString("Epson RAW Format"); 
    264270  entry->module=ConstantString("DNG"); 
     
    267273  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    268274  entry->blob_support=MagickFalse; 
     275  entry->format_type=ExplicitFormatType; 
    269276  entry->description=ConstantString("Kodak Digital Camera Raw Image Format"); 
    270277  entry->module=ConstantString("DNG"); 
     
    273280  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    274281  entry->blob_support=MagickFalse; 
     282  entry->format_type=ExplicitFormatType; 
    275283  entry->description=ConstantString("Kodak Digital Camera Raw Image Format"); 
    276284  entry->module=ConstantString("DNG"); 
     
    279287  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    280288  entry->blob_support=MagickFalse; 
     289  entry->format_type=ExplicitFormatType; 
    281290  entry->description=ConstantString("Sony (Minolta) Raw Image File"); 
    282291  entry->module=ConstantString("DNG"); 
     
    285294  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    286295  entry->blob_support=MagickFalse; 
     296  entry->format_type=ExplicitFormatType; 
    287297  entry->description=ConstantString("Nikon Digital SLR Camera Raw Image File"); 
    288298  entry->module=ConstantString("DNG"); 
     
    291301  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    292302  entry->blob_support=MagickFalse; 
     303  entry->format_type=ExplicitFormatType; 
    293304  entry->description=ConstantString("Olympus Digital Camera Raw Image File"); 
    294305  entry->module=ConstantString("DNG"); 
     
    297308  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    298309  entry->blob_support=MagickFalse; 
     310  entry->format_type=ExplicitFormatType; 
    299311  entry->description=ConstantString("Pentax Electronic File"); 
    300312  entry->module=ConstantString("DNG"); 
     
    303315  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    304316  entry->blob_support=MagickFalse; 
     317  entry->format_type=ExplicitFormatType; 
    305318  entry->description=ConstantString("Fuji CCD-RAW Graphic File"); 
    306319  entry->module=ConstantString("DNG"); 
     
    309322  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    310323  entry->blob_support=MagickFalse; 
     324  entry->format_type=ExplicitFormatType; 
    311325  entry->description=ConstantString("Sony Raw Format"); 
    312326  entry->module=ConstantString("DNG"); 
     
    315329  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    316330  entry->blob_support=MagickFalse; 
     331  entry->format_type=ExplicitFormatType; 
    317332  entry->description=ConstantString("Sony Raw Format 2"); 
    318333  entry->module=ConstantString("DNG"); 
     
    321336  entry->decoder=(DecodeImageHandler *) ReadDNGImage; 
    322337  entry->blob_support=MagickFalse; 
     338  entry->format_type=ExplicitFormatType; 
    323339  entry->description=ConstantString("Sigma Camera RAW Picture File"); 
    324340  entry->module=ConstantString("DNG"); 
  • ImageMagick/trunk/coders/gradient.c

    r11515 r11590  
    173173  entry->raw=MagickTrue; 
    174174  entry->endian_support=MagickTrue; 
    175   entry->description=ConstantString("Gradual passing from one shade to another"); 
     175  entry->format_type=ImplicitFormatType; 
     176  entry->description=ConstantString("Gradual passing from one shade to " 
     177    "another"); 
    176178  entry->module=ConstantString("GRADIENT"); 
    177179  (void) RegisterMagickInfo(entry); 
  • ImageMagick/trunk/coders/histogram.c

    r11356 r11590  
    9898  entry->encoder=(EncodeImageHandler *) WriteHISTOGRAMImage; 
    9999  entry->adjoin=MagickFalse; 
     100  entry->format_type=ImplicitFormatType; 
    100101  entry->description=ConstantString("Histogram of the image"); 
    101102  entry->module=ConstantString("HISTOGRAM"); 
  • ImageMagick/trunk/coders/label.c

    r11047 r11590  
    227227  entry->decoder=(DecodeImageHandler *) ReadLABELImage; 
    228228  entry->adjoin=MagickFalse; 
     229  entry->format_type=ImplicitFormatType; 
    229230  entry->description=ConstantString("Image label"); 
    230231  entry->module=ConstantString("LABEL"); 
  • ImageMagick/trunk/coders/map.c

    r11308 r11590  
    278278  entry->encoder=(EncodeImageHandler *) WriteMAPImage; 
    279279  entry->adjoin=MagickFalse; 
     280  entry->format_type=ExplicitFormatType; 
    280281  entry->raw=MagickTrue; 
    281282  entry->endian_support=MagickTrue; 
  • ImageMagick/trunk/coders/matte.c

    r9589 r11590  
    9292  entry=SetMagickInfo("MATTE"); 
    9393  entry->encoder=(EncodeImageHandler *) WriteMATTEImage; 
     94  entry->format_type=ExplicitFormatType; 
    9495  entry->description=ConstantString("MATTE format"); 
    9596  entry->module=ConstantString("MATTE"); 
  • ImageMagick/trunk/coders/null.c

    r11047 r11590  
    190190  entry->encoder=(EncodeImageHandler *) WriteNULLImage; 
    191191  entry->adjoin=MagickFalse; 
     192  entry->format_type=ImplicitFormatType; 
    192193  entry->description=ConstantString("Constant image of uniform color"); 
    193194  entry->module=ConstantString("NULL"); 
  • ImageMagick/trunk/coders/plasma.c

    r11461 r11590  
    243243  entry->decoder=(DecodeImageHandler *) ReadPlasmaImage; 
    244244  entry->adjoin=MagickFalse; 
     245  entry->format_type=ImplicitFormatType; 
    245246  entry->description=ConstantString("Plasma fractal image"); 
    246247  entry->module=ConstantString("PLASMA"); 
     
    249250  entry->decoder=(DecodeImageHandler *) ReadPlasmaImage; 
    250251  entry->adjoin=MagickFalse; 
     252  entry->format_type=ImplicitFormatType; 
    251253  entry->description=ConstantString("Plasma fractal image"); 
    252254  entry->module=ConstantString("PLASMA"); 
  • ImageMagick/trunk/coders/preview.c

    r9589 r11590  
    101101  entry->encoder=(EncodeImageHandler *) WritePreviewImage; 
    102102  entry->adjoin=MagickFalse; 
     103  entry->format_type=ImplicitFormatType; 
    103104  entry->description=ConstantString( 
    104105    "Show a preview an image enhancement, effect, or f/x"); 
  • ImageMagick/trunk/coders/stegano.c

    r11047 r11590  
    243243  entry=SetMagickInfo("STEGANO"); 
    244244  entry->decoder=(DecodeImageHandler *) ReadSTEGANOImage; 
     245  entry->format_type=ImplicitFormatType; 
    245246  entry->description=ConstantString("Steganographic image"); 
    246247  entry->module=ConstantString("STEGANO"); 
  • ImageMagick/trunk/coders/tile.c

    r11047 r11590  
    158158  entry=SetMagickInfo("TILE"); 
    159159  entry->decoder=(DecodeImageHandler *) ReadTILEImage; 
     160  entry->format_type=ImplicitFormatType; 
    160161  entry->raw=MagickTrue; 
    161162  entry->endian_support=MagickTrue; 
  • ImageMagick/trunk/coders/vid.c

    r11047 r11590  
    247247  entry->decoder=(DecodeImageHandler *) ReadVIDImage; 
    248248  entry->encoder=(EncodeImageHandler *) WriteVIDImage; 
     249  entry->format_type=ImplicitFormatType; 
    249250  entry->description=ConstantString("Visual Image Directory"); 
    250251  entry->module=ConstantString("VID"); 
  • ImageMagick/trunk/coders/x.c

    r9589 r11590  
    145145  entry->encoder=(EncodeImageHandler *) WriteXImage; 
    146146#endif 
     147  entry->format_type=ImplicitFormatType; 
    147148  entry->description=ConstantString("X Image"); 
    148149  entry->module=ConstantString("X"); 
  • ImageMagick/trunk/coders/xc.c

    r11047 r11590  
    202202  entry->decoder=(DecodeImageHandler *) ReadXCImage; 
    203203  entry->adjoin=MagickFalse; 
     204  entry->format_type=ImplicitFormatType; 
    204205  entry->raw=MagickTrue; 
    205206  entry->endian_support=MagickTrue; 
  • ImageMagick/trunk/magick/image.c

    r11518 r11590  
    35333533  if (*extension != '\0') 
    35343534    { 
    3535       MagickBooleanType 
    3536         explicit; 
     3535      MagickFormatType 
     3536        format_type; 
    35373537 
    35383538      register long 
     
    35403540 
    35413541      static const char 
    3542         *explicit_formats[] = 
     3542        *format_type_formats[] = 
    35433543        { 
    35443544          "AUTOTRACE", 
    35453545          "BROWSE", 
    35463546          "CAPTION", 
    3547           "CLIPBOARD", 
    35483547          "DCRAW", 
    35493548          "EDIT", 
    35503549          "FRACTAL", 
    3551           "GRADIENT", 
    3552           "HISTOGRAM", 
    35533550          "LABEL", 
    35543551          "LAUNCH", 
    3555           "MAP", 
    3556           "MATTE", 
    35573552          "MPEG:ENCODE", 
    3558           "NULL", 
    3559           "PLASMA", 
    35603553          "PREVIEW", 
    35613554          "PRINT", 
     
    35673560          "SCAN", 
    35683561          "SHOW", 
    3569           "STEGANO", 
    3570           "TILE", 
    35713562          "TMP", 
    3572           "VID", 
    35733563          "WIN", 
    3574           "X", 
    3575           "XC", 
    35763564          (char *) NULL 
    35773565        }; 
     
    35833571      LocaleUpper(magic); 
    35843572      /* 
    3585         Look for explicit image formats. 
     3573        Look for format_type image formats. 
    35863574      */ 
    3587       explicit=MagickTrue; 
     3575      format_type=ImplicitFormatType; 
    35883576      if ((LocaleNCompare(image_info->magick,"SGI",3) == 0) && 
    35893577          (LocaleCompare(magic,"RGB") == 0)) 
    3590         explicit=MagickFalse; 
     3578        format_type=ExplicitFormatType; 
    35913579      i=0; 
    3592       while ((explicit != MagickFalse) && 
    3593              (explicit_formats[i] != (char *) NULL)) 
     3580      while ((format_type != MagickFalse) && 
     3581             (format_type_formats[i] != (char *) NULL)) 
    35943582      { 
    3595         if ((*magic == *explicit_formats[i]) && 
    3596             (LocaleCompare(magic,explicit_formats[i]) == 0)) 
    3597           explicit=MagickFalse; 
     3583        if ((*magic == *format_type_formats[i]) && 
     3584            (LocaleCompare(magic,format_type_formats[i]) == 0)) 
     3585          format_type=ExplicitFormatType; 
    35983586        i++; 
    35993587      } 
    3600       if (explicit != MagickFalse) 
     3588      magick_info=GetMagickInfo(magic,&sans_exception); 
     3589      if ((magick_info != (const MagickInfo *) NULL) && 
     3590          (magick_info->format_type != UndefinedFormatType)) 
     3591        format_type=magick_info->format_type; 
     3592      if (format_type == ImplicitFormatType) 
    36013593        (void) CopyMagickString(image_info->magick,magic,MaxTextExtent); 
    3602       if ((LocaleCompare(magic,"CR2") == 0) || 
    3603           (LocaleCompare(magic,"DNG") == 0) || 
    3604           (LocaleCompare(magic,"NEF") == 0)) 
    3605         image_info->affirm=MagickTrue;  /* Raw camera masquerading as TIFF */ 
     3594      else 
     3595        if (format_type == ExplicitFormatType) 
     3596          image_info->affirm=MagickTrue; 
    36063597    } 
    36073598  /* 
  • ImageMagick/trunk/magick/magick.h

    r8839 r11590  
    2222extern "C" { 
    2323#endif 
     24 
     25typedef enum 
     26{ 
     27  UndefinedFormatType, 
     28  ImplicitFormatType, 
     29  ExplicitFormatType 
     30} MagickFormatType; 
    2431 
    2532typedef enum 
     
    6976    blob_support, 
    7077    seekable_stream; 
     78 
     79  MagickFormatType 
     80    format_type; 
    7181 
    7282  MagickStatusType