PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Image Resizer gives uses "ghost" number for height.

Open sosssego opened this issue 2 years ago • 6 comments

Microsoft PowerToys version

v0.60.1

Running as admin

  • [ ] Yes

Area(s) with issue?

Image Resizer

Steps to reproduce

On the image resizer settings. Create a preset (fit, for example) and set units to pixels. Set height to 1234. Then modify this preset by switching to percentage units, and enter some percentage value for width, 30 for example. Set a name pattern that uses %4 (selected height). Then use this preset on some image. The %4 value will appear as 1234. Even if this value is not used to resize or even visible in the percent preset.

✔️ Expected Behavior

For percent the image is uniformly resized. expected the height value to be the same as the width value.

❌ Actual Behavior

the %4 will be set as 1234 (from height field).

Other Software

No response

sosssego avatar Jul 18 '22 22:07 sosssego

the %4 will be set as whatever was in the height field before switching to percent.

Sounds like #18940, could you test and confirm if it is the same thing?

Jay-o-Way avatar Jul 18 '22 22:07 Jay-o-Way

It is not the same thing. It accepts the value, but when using percent the heigh value is not used to resize the image. I updated the steps to reproduce to make it clearer.

sosssego avatar Jul 19 '22 15:07 sosssego

I can reproduce this issue. image

The file name will be like "...(Height 50).jpg" even if you select "Fit" where Height is not visible.

CleanCodeDeveloper avatar Aug 15 '22 19:08 CleanCodeDeveloper

@sosssego: Would it solve your problem if you use %6 instead of %4?

image

CleanCodeDeveloper avatar Aug 15 '22 19:08 CleanCodeDeveloper

I believe the issue is that the control is only hidden, but still read in the code upon execution.

Jay-o-Way avatar Aug 15 '22 21:08 Jay-o-Way

I believe the issue is that the control is only hidden, but still read in the code upon execution.

It's true that the control is hidden, the value is saved to the settings.json file. However, the value is only used if you explicitly reference them in the custom filename. I don't think this needs to be fixed.

CleanCodeDeveloper avatar Aug 22 '22 19:08 CleanCodeDeveloper

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 5 days. It will be closed if no further activity occurs within 5 days of this comment.

ghost avatar Sep 23 '22 02:09 ghost