Skip to content

write_binary_image : RGBAモードの指定を削除し、デフォルトモードで画像を保存するように変更#747

Merged
yuji38kwmt merged 1 commit intomainfrom
20260312-3
Mar 12, 2026
Merged

write_binary_image : RGBAモードの指定を削除し、デフォルトモードで画像を保存するように変更#747
yuji38kwmt merged 1 commit intomainfrom
20260312-3

Conversation

@yuji38kwmt
Copy link
Copy Markdown
Collaborator

close #724

Copilot AI review requested due to automatic review settings March 12, 2026 03:49
@kci-pr-agent
Copy link
Copy Markdown

kci-pr-agent bot commented Mar 12, 2026

Title

write_binary_image : RGBAモードの指定を削除し、デフォルトモードで画像を保存するように変更


Description

  • Image.fromarrayからmode="RGBA"を削除

  • デフォルトモードでPNGを保存


Changes walkthrough 📝

Relevant files
Enhancement
segmentation.py
RGBAモード指定を削除                                                                                         

annofabapi/segmentation.py

  • Image.fromarraymode引数を削除
  • デフォルトモードでPNG画像を保存
+1/-1     

Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @kci-pr-agent
    Copy link
    Copy Markdown

    kci-pr-agent bot commented Mar 12, 2026

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🎫 Ticket compliance analysis ✅

    724 - PR Code Verified

    Compliant requirements:

    • Pillow 11.3.0で発生するDeprecationWarningに対応する
    Image.fromarraymodeパラメータを削除する

    Requires further human verification:

    • 生成されたPNG画像が問題なく表示されることを目視または自動化テストで確認する

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    @kci-pr-agent
    Copy link
    Copy Markdown

    kci-pr-agent bot commented Mar 12, 2026

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    Copy link
    Copy Markdown

    Copilot AI left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Pull request overview

    Pillow 11.3.0 以降で Image.fromarray(..., mode="RGBA") に対して発生する DeprecationWarning を回避するため、write_binary_image で画像保存時に mode 引数を指定せず、Pillow のデフォルト推論に任せるように変更するPRです(Annofab用セグメンテーション画像の書き出し処理)。

    Changes:

    • write_binary_imageImage.fromarray(..., mode="RGBA")Image.fromarray(...) に変更し、DeprecationWarning を解消

    You can also share your feedback on Copilot code review. Take the survey.

    @yuji38kwmt yuji38kwmt merged commit 92d03b3 into main Mar 12, 2026
    17 of 19 checks passed
    @yuji38kwmt yuji38kwmt deleted the 20260312-3 branch March 12, 2026 03:53
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    None yet

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    [REQ][feature] Pillow 11.3.0から発生するDeprecationWarning に対応する

    2 participants