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

Abierto
#28 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Python
Estrellas
1
Forks
0
Merge medio
4 h 13 min
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cadentdev/ipro

Todos los issues de cadentdev/ipro

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.