Powertoys: Image Resizer filename format

Created on 8 May 2020  路  9Comments  路  Source: microsoft/PowerToys

Environment

Windows build number: 10.0.18363.778
PowerToys version: https://github.com/microsoft/PowerToys/commit/1891bd494c32401e9531a6ff212ae82bcccff837
PowerToy module for which you are reporting the bug (if applicable): Settings

Steps to reproduce

  • Run Powertoys
  • Open Image Resizer settings
  • Set filename format "%1_%3x%4" or "%1 (%3x%4)" or "%1"
  • Open any other settings
  • Open Image Resizer settings

Expected behavior

New format applies

Actual behavior

The old format remains

Screenshots

Start value
image

New format
image

After reopening
image

Area-User Interface Issue-Bug Product-Image Resizer

Most helpful comment

I can also confirm this behavior (in v0.18.1), but have also determined that the pattern can be changed, as long as the _original format pattern_ remains in the new format pattern.

Example:
%5 (%6) will save, because the %X (%Y) pattern remains.
%5_(%6) will not, because the _space_ was changed/removed.

Text can be added before the pattern and text can be added after the pattern, but the original pattern must remain.

I am able to save RESIZE_%1 (%2)_%5x%6 because the original %X (%Y) pattern is retained in the new pattern. I cannot, as @yevhenii44 indicated in his initial post, change it to %1_(%5x%6) because the %X (%Y) pattern is not in the new pattern.

Also of note: The settings page shows:
image

However, %5 = Actual width and %6 = Actual height. The descriptions are reversed.

Hopefully this helps.

All 9 comments

I was able to reproduce this once, but not consistently, seems that it just decided to start working correctly.

Oh, I think I found the problem, the regex at ImageResizerViewModel.cs:181 rejects your strings.

I can also confirm this behavior (in v0.18.1), but have also determined that the pattern can be changed, as long as the _original format pattern_ remains in the new format pattern.

Example:
%5 (%6) will save, because the %X (%Y) pattern remains.
%5_(%6) will not, because the _space_ was changed/removed.

Text can be added before the pattern and text can be added after the pattern, but the original pattern must remain.

I am able to save RESIZE_%1 (%2)_%5x%6 because the original %X (%Y) pattern is retained in the new pattern. I cannot, as @yevhenii44 indicated in his initial post, change it to %1_(%5x%6) because the %X (%Y) pattern is not in the new pattern.

Also of note: The settings page shows:
image

However, %5 = Actual width and %6 = Actual height. The descriptions are reversed.

Hopefully this helps.

I can confirm the behaviour as above. Issue still exists in v0.18.2

@niels9001, are we viewing this as done in the august release?

@crutkas Oh, I think the issue @Mighty-Monarch mentioned is resolved. Not sure about the core issue, haven't looked at that. Maybe having the 'In progress' label here isn't appropriate then.

Did some quick testing (0.23.2) and this doesn't happen for me. Just saying.

I can also confirm that all of the issues that I and @yevhenii44 mentioned have been fixed.

It works as expected now.

@Mighty-Monarch Thanks for letting us know!

Was this page helpful?
0 / 5 - 0 ratings