[FEATURE REQUEST] Need expanded queries about formats

オープン
#4,853 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
cpp

調査の方向性

まず ImageInput と ImageOutput の supports() メソッドを読み、そこにある capability token を既存の getattribute アプローチと比較してください。フォーマット名によるサポートクエリや圧縮方式のリストなどの値を返せる汎用的な query API を提案する前に、議論を確認してください。完了とするには、単に boolean 拡張を行うだけでなく、合意された設計が必要です。

索引モデルが issue の本文から書いたものです。

説明

core APIs

Since the very earliest days of OIIO, the ImageInput and ImageOutput classes have had supports() methods that let you test whether the reader or writer has a particular capability. For example,

if (imageoutput->supports("tiles")) {
    // we know the format writer supports tiles
} else {
    // only scanline output is supported
}

The list of tokens denoting capabilities has expanded over the years, but we still just return a bool: it supports the feature or it doesn't.

A concrete example where this is inadequate is if an app wants to know the list of compression methods available for a certain format. Here, an array of strings (or maybe one string that is a comma-separated list) would be much better. There's not much we can do with a bool here.

Anyway, I don't yet have a specific solution to propose. But maybe we can use this issue to discuss or have people propose a solution? What we want is something akin to supports(), but capable of more general queries about formats and their features, supporting arbitrary data types (with shades of getattribute, perhaps). And maybe it would be useful to be able to ask about formats by name, without already needing to hold a created instance of a reader/writer?

Suggestions welcome.

主要言語
C++
スター
2.4k
フォーク
727
平均マージ
4日 8時間
マージ済み PR(30日)
67

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AcademySoftwareFoundation/OpenImageIO のほかの issue

AcademySoftwareFoundation/OpenImageIO の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。