Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 11 users
Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocked on:
issue 652352

Blocking:
issue 646378



Sign in to add a comment
Resize images in Photo Editor
Reported by bengold@chromium.org, Nov 11 2015 Back to list
Add the ability to scale images in the Photo Editor.
 
Cc: -bengold@chromium.org
Labels: -Pri-1 -M-49 M-51 Pri-2
Comment 3 by hirono@chromium.org, Mar 17 2016
Cc: joshwoodward@chromium.org
 Issue 178962  has been merged into this issue.
Comment 4 by fukino@chromium.org, Apr 21 2016
Labels: -Pri-2 -M-51 Pri-3
Comment 5 by fukino@chromium.org, Apr 21 2016
Cc: oka@chromium.org fukino@chromium.org
Owner: ----
Status: Available
 Issue 590481  has been merged into this issue.
Comment 7 by fukino@chromium.org, Aug 17 2016
Cc: hirono@chromium.org
Owner: harukam@chromium.org
Status: Assigned
harukam@ is investigating how to add this feature.
Comment 8 by fukino@chromium.org, Aug 17 2016
Cc: mitsuji@chromium.org ryoh@chromium.org
 Issue 578936  has been merged into this issue.
Comment 9 by harukam@google.com, Aug 19 2016
Cc: harukam@chromium.org
Owner: jonnymack@chromium.org
created a "resize" ability prototype. (https://drive.google.com/a/google.com/file/d/0B69RNuiBbypXWDdBRU1MV0FhZjg/view)
Would you create an design spec for this?
Awesome!
One nit question: what happens when a user resizes an image that is larger than app window?
I guess such large image is scaled to window size automatically and the user does not get visual feedback while resizing image.
Comment 11 by harukam@google.com, Aug 19 2016
That's right.
The image does not seem to change if both images (before/after scaled) is larger than window size.
To give users visual feedback, I'm considering two solutions.
One is showing a "Resized" tool-tip for a moment just like "auto-fix" mode.
Second is performing a scaling animation as well as "crop" and "rotate" mode.
Maybe Jonny can decide which way we should go. Thanks!

It is great to see this being worked on. Thanks.

A third option would be to show the scale factor (%) all the time, so the user could tell even for unmodified images if they had been scaled? Then a resize from larger than window to larger than window would result in the scale factor changing.
Comment 14 by harukam@google.com, Aug 22 2016
Comment13 sounds good to me.
Jonny, could you consider showing scale factor while editing?
Labels: -Pri-3 M-55 Pri-2
Jonny, do you have cycles to design this feature?

harukam@ has already implemented a basic function (See prototype in comment #9).
With the design spec, I think we can expect this feature to be shipped with M55.

Thanks! 
Sorry for the late reply. The prototype LGTM. Are there open UX questions or interactions I can help clarify or are you simply looking for a visual design spec? I'm happy to help w/ the former. sgabriel can help w/ the latter.
Comment 17 by harukam@google.com, Aug 30 2016
Cc: sgabr...@chromium.org
Basically, we need a design spec.
Sebastien, could you help to provide us with a design spec for "resize" mode? (See prototype in comment #9)

We also have one open question for Jonny.
How should we give users visual feedback while resizing an image when both images (before/after scaled) are larger than window size?

We have three ideas so far.
1) showing a "Resized" tool-tip for a moment
2) performing a scaling animation
3) showing the scale factor while editing

Which do you think is the best way, or do you have another idea?
My preference is for #3. I like the immediate feedback provided by showing changes in realtime. FWIW that's what Google Photos does (screenshot attached).
Screen Shot 2016-08-31 at 1.35.26 PM.png
8.1 MB View Download
Thanks for your comment, but Google Photos is not very helpful since it does not have a function to resize images.

If we show the scale factor all the time (or while editing), where do you think it should be in gallery window?
Owner: sgabr...@chromium.org
Hi, let me assign sgabriel@ as we are waiting for a design spec.
Comment 21 by harukam@google.com, Sep 12 2016
We have decided to set font-size of input field smaller per offline discussion.
sgabriel@, would you take a look at the attached image 'smaller_font.png' and check it's alright?
Also, please check 'alertdialog.png', which is the screen shot when alert dialog has shown.
smaller_font.png
294 KB View Download
alertdialog.png
220 KB View Download
Owner: harukam@chromium.org
Dialog looks good.
Regarding the resize implementation, I created a quick spec to illustrate the changes:

- I increased the height of the second bottom toolbar to 56px
- Removed the "Fix ratio" checkbox by a lock in the middle of width and height
- Positioned textfields 8px from the first bottom bar (toolbar)
- Included new assets for the resize button as well as locked/unlocked asset for the ratio toggle. See attached.

Note that when the ratio is set to unlocked (crossed locked icon) the icon alpha is set to 0.54.



assets.zip
3.3 KB Download
PREVIEW - Edit - resize.png
1.5 MB View Download
Cc: weifangsun@chromium.org
Thank you Sebastien!

Weifang, could you file a launch bug for this feature request?
We are on track to implement this with the provided design before M55 feature freeze.
Comment 24 by harukam@google.com, Sep 13 2016
Thank you, Sebastien!

I was really surprised and excited since your design spec is really nice and truly different from mine.
I'd like to adjust to this new one as soon as possible! Thanks.
Blocking: 646378
Hi all - I'm not sure if this feature requires a launch bug, but I've filed one to be safe given the UI changes. Will keep you updated on the launch approvals process.
@harukam: As you work on this feature, can you also be sure to implement the following -
1. Accessibility (I believe you can follow the implementations set by the other Edit features)
2. UMA Stats - Not sure if we are tracking any stats for Gallery usage?
+1 on UMA. If there aren't similar UMA stats for Gallery usage, please add these while you are at it. :)
It looks FileBrowser.PhotoEditor.Tool is a good place to add the stats.
https://cs.chromium.org/chromium/src/ui/file_manager/gallery/js/image_editor/image_editor.js?rcl=0&l=185

Project Member Comment 30 by bugdroid1@chromium.org, Sep 16 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2a9b96ee109657042e20d9e5bc82e0b430c78e87

commit 2a9b96ee109657042e20d9e5bc82e0b430c78e87
Author: harukam <harukam@google.com>
Date: Fri Sep 16 12:55:47 2016

Add an ability for resize in gallery.

BUG=554440
TEST=browser_tests --gtest_filter=GalleryBrowserTestInGuestMode.ResizeImageOnDownloads

Review-Url: https://codereview.chromium.org/2299493002
Cr-Commit-Position: refs/heads/master@{#419151}

[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/chrome/app/chromeos_strings.grdp
[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc
[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/chrome/browser/chromeos/file_manager/gallery_browsertest.cc
[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/css/gallery.css
[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/gallery.html
[add] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/images/100/ratio_locked.png
[add] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/images/100/ratio_unlocked.png
[add] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/images/100/resize.png
[add] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/images/200/ratio_locked.png
[add] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/images/200/ratio_unlocked.png
[add] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/images/200/resize.png
[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/js/compiled_resources.gyp
[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/js/gallery.js
[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/js/gallery_scripts.js
[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/js/image_editor/commands.js
[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/js/image_editor/image_editor.js
[add] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/js/image_editor/image_resize.js
[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/js/slide_mode.js
[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/gallery/js/slide_mode_unittest.html
[modify] https://crrev.com/2a9b96ee109657042e20d9e5bc82e0b430c78e87/ui/file_manager/integration_tests/gallery/photo_editor.js

Hi Haruka,

I've been testing out this feature in M55 Dev and it looks great! A few asks -

1. From the UI Review discussion, would you be able to implement a scrollbar to account for the case where the image is resized larger than the display? (This is the exception case that was previously discussed above.)

2. I expected that I would be able to have the image resize capability via using mouse on the image with a drag/drop box? Is this possible to add? Ideally, the Width/Height #s would reflect as the user drags. Or, another option would be that these values get updated on the resize.

Thanks,
Weifang
Comment 32 by harukam@google.com, Sep 27 2016
Hi Weifang,

Regarding the first one, I think it's possible to add the feature, but it will take some time to implement and we need a mock for it. Probably we won't make it in time for M55. Do you think we should revert the change for 'resize' ability from M54?

Concerning the second one, it should be more difficult than the first one although we have to take a look in more detail.

Thanks,
Hi Haruka,

Thanks for the update!

On (1), I don't think we need to revert this feature for M55 if it's not implemented (Note: Zoom capability currently exists in the View mode), but I think it would be good to start the work and see if we can get it in before the M55 branch on 10/6.

@sgabriel - Would you be able to provide mocks for including vertical and horizontal scrolls in the case where the image is resized larger than the app?

On (2), it would be good to understand the work involved for this feature, but let's prioritize (1) for M55.

Please let me know if you have any questions!

Thanks,
Weifang
See attached.
PREVIEW - Edit - scrollbars.png
3.4 MB View Download
Thanks for the quick turn around @sgabriel!
Comment 36 by harukam@google.com, Sep 29 2016
Thanks, @sgabriel!
Blockedon: 652352
Hi all - We received some feedback from the Accessibility review which I've logged under  crbug.com/652352 . 
Owner: fukino@chromium.org
Thanks!
I'll do the remaining work for this issue.
As we have decided to prioritize fixing the Accessibility bug for M55, I've created bugs to track the scrolling (crbug.com/653570) and resize via mouse (crbug.com/653573) features separately.
Sign in to add a comment