[BUG] CMYK is being saved as RGB on export
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
調査の方向性
まず、提供された oiiotool コマンドで問題を再現し、C++ ImageInput/ImageOutput の使用方法を確認します。エクスポート前後のチャンネル数と色空間メタデータを比較します。リサイズして保存した後も CMYK 入力が CMYK のままであり、適切な回帰テストがあることを完了条件とします。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
We employ the oiio library for reading and writing files before and after upscaling images. However, it saves CMYK images as RGB during export, although they appear correct before exporting.
OpenImageIO version and dependencies
OpenImageIO version 2.5.7.0-1 installed from ArchLinux repo
To Reproduce
We use the C++ API for using oiio in our code
The code to save is
std::unique_ptr<ImageInput> in = ImageInput::open(imagepath.c_str());
if (!in)
{
std::cerr << "Could not open " << imagepath.c_str() << ", error = " << geterror() << "\n";
errorOccurred = true;
continue;
}
const ImageSpec &spec = in->spec();
w = spec.width;
h = spec.height;
c = spec.nchannels;
pixeldata = new unsigned char[w * h * c];
in->read_image(0, 0, 0, c, TypeDesc::UINT8, pixeldata);
in->close();
and the code to save image is:
std::unique_ptr<ImageOutput> out = ImageOutput::create(v.outpath.c_str());
if (!out)
{
std::cerr << "Could not create output image, error = " << geterror() << "\n";
continue;
}
std::unique_ptr<ImageInput> in = ImageInput::open(v.inpath.c_str());
if (!in)
{
std::cerr << "Could not read input image, error = " << geterror() << "\n";
continue; // Handle error appropriately
}
const ImageSpec &inputImageSpec = in->spec();
in->close(); // Close the input image
ImageSpec spec(v.outimage.w, v.outimage.h, v.outimage.elempack, TypeDesc::UINT8);
spec.extra_attribs = inputImageSpec.extra_attribs;
spec.extra_attribs.attribute("XResolution", 300);
spec.extra_attribs.attribute("YResolution", 300);
spec.extra_attribs.attribute("Exif:PixelXDimension", v.outimage.w);
spec.extra_attribs.attribute("Exif:PixelYDimension", v.outimage.h);
std::cout << "\n\nNew Color Space: " << spec.extra_attribs.get_string("ICCProfile:color_space") << "\n\n";
success = out->open(v.outpath.c_str(), spec);
if (!success)
{
std::cerr << "Could not open output image, error = " << out->geterror() << "\n";
continue;
}
success = out->write_image(TypeDesc::UINT8, v.outimage.data);
if (!success)
{
std::cerr << "Could not write output image, error = " << out->geterror() << "\n";
continue;
}
out->close();
oiiotool code to replicate is
oiiotool output/cmyk_original.jpg --resize 500x333 --metamerge -o cmyk1.jpg
Evidence
The information is there before saving
But after saving the image file
The Original Photo
The processed photo
- 主要言語
- C++
- スター
- 2.4k
- フォーク
- 727
- 平均マージ
- 4日 8時間
- マージ済み PR(30日)
- 67
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AcademySoftwareFoundation/OpenImageIO のほかの issue
-
bug: Python ImageBuf.get_pixels(oiio.UNKNOWN) returns None silently or segfaults再び着手できるかも @stevwya77 が 9 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug good first issue python
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
AcademySoftwareFoundation/OpenImageIO#5698 · コメント 3 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
AcademySoftwareFoundation/OpenImageIO#5619 · コメント 2 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
AcademySoftwareFoundation/OpenImageIO#5570 ·
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
AcademySoftwareFoundation/OpenImageIO#5558 ·
メンテナーはふだん 3 日以内に返信
-
define which color metadata OpenImageIO trusts, and when it resolves it対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
AcademySoftwareFoundation/OpenImageIO#5516 ·
メンテナーはふだん 3 日以内に返信
AcademySoftwareFoundation/OpenImageIO の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
godotengine/godot#125913 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
期待增加虚线线条样式オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
vllm-project/vllm#70568 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mw00/project-maya#1368 ·
メンテナーはふだん 2 日以内に返信