Magick::CoderInfo

CoderInfo 類別提供了一種方法來提供有關 ImageMagick 對影像格式(由魔術字串指定)的支援資訊。 它可以用於提供對特定命名格式(作為建構函式的參數提供)的支援,或者在使用 coderInfoList() 模板函式查詢格式支援時作為容器的元素。

以下程式碼片段說明了如何使用 CoderInfo。

CoderInfo info("GIF"); 
cout < info->name() << ": (" << info->description() << ") : "; 
cout << "Readable = "; 
if ( info->isReadable() ) 
  cout << "true"; 
else 
  cout << "false"; 
cout << ", "; 
cout << "Writable = "; 
if ( info->isWritable() ) 
  cout << "true"; 
else 
  cout << "false"; 
cout << ", "; 
cout << "Multiframe = "; 
if ( info->isMultiframe() ) 
  cout << "true"; 
else 
  cout << "false"; 
cout << endl;

下表顯示了 CoderInfo 類別中可用的方法