resize: add --long-edge to size mixed portrait/landscape batches

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

Read the resize command's existing --width and --height handling, then trace how image dimensions account for EXIF orientation. Implementing the proposed --long-edge behavior also needs to preserve the no-upscaling requirement across portrait and landscape images. Done means mixed batches resize their longer upright side to the requested limit; the optional --short-edge is a separate extension.

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

説明

Problem

resize only takes --width or --height. A mixed batch of landscape and portrait photos usually has one target: a maximum long edge. Squarespace, for example, recommends 2500px on the long edge.

With today's flags, a batch needs per-image arithmetic outside ipro. Landscape 4032x3024 gets --width 2500. Portrait 3024x4032 gets --width 1875. I had to read each image's upright dimensions with ImageMagick and compute the width in a shell loop.

Proposal

Add a long-edge option, e.g. --long-edge 2500 (or --max 2500), that scales whichever side is longer to that size, measured after EXIF orientation is applied. It should not upscale images that are already smaller.

Optional: a matching --short-edge for square-ish crops.

Context

Hit on 2026-11-17 with ipro 1.7.0 while preparing 24 client photos (16 landscape, 8 portrait) for a Squarespace blog post.

— Emily

主要言語
Python
スター
1
フォーク
0
平均マージ
4時間 13分
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

cadentdev/ipro のほかの issue

cadentdev/ipro の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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