Skip to content

feat: add tools/resize.ps1 for Windows - #106

Merged
yusukebe merged 1 commit into
yusukebe:masterfrom
otnc:add-resize-ps1
Oct 28, 2026
Merged

yusukebe merged 1 commit into
yusukebe:masterfrom
otnc:add-resize-ps1

Conversation

@otnc

@otnc otnc commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Closes #59

tools/resize.sh depends on macOS sips and jpegtran, so it can't be used on Windows. This adds tools/resize.ps1, a PowerShell counterpart that uses the built-in System.Drawing, so no extra tools are needed.

It mirrors resize.sh:

  • Same arguments and usage message: powershell -ExecutionPolicy Bypass -File tools/resize.ps1 IMG_123.JPG yoshimuraya-001.jpg
  • Moves the original to the new path, then resizes it in place
  • Fits the longest side to 800px like sips -Z 800
  • Strips all metadata like jpegtran -copy none, after applying the EXIF orientation to the pixels so photos stay upright
  • Prints pixelHeight / pixelWidth in the same format as sips -g

I also added the Windows usage to the photo step in AGENTS.md and to the "Resize & Optimize photos" tip in README.md.

Tested with Windows PowerShell 5.1 and PowerShell 7 on Windows 11.

@yusukebe yusukebe left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM!

@yusukebe

Copy link
Copy Markdown
Owner

@otnc

Thanks! Let's go with this.

@yusukebe
yusukebe merged commit ab70f9b into yusukebe:master Oct 28, 2026
1 check passed
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.

Add tools/resize.ps1 for Windows

2 participants