New issue
Advanced search Search tips

Issue 590630 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Nov 2016
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Profile image set from a file isn't cropped and resized correctly

Project Member Reported by satorux@chromium.org, Feb 29 2016

Issue description

Chrome Version       : 50.0.2657.0
OS Version: 7956.1.0

What steps will reproduce the problem?
1. Go to chrome:settings
2. Click on the profile image to change it
3. Select a large non-square image file from the file picker
4. Lock the screen
5. Also go to chrome://userimage/<email-address>

What is the expected result?

The lock screen shows the profile image in the square format.

What happens instead of that?

The lock screen shows the profile image in a non-square format.

chrome://userimage/<email-address> shows the profile image in the original size (thus large)




Please provide any additional information below. Attach a screenshot if
possible.

UserAgentString: Mozilla/5.0 (X11; CrOS x86_64 7956.1.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2657.0 Safari/537.36



 
If you sign out, the profile picture in the login screen is properly cropped and resized. Confirmed that the image stored at /home/chronos is properly cropped and resized to 512x512 pixels.
Status: Started (was: Assigned)
The problem is that the raw_image is not updated. I'll create a fix.
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/730760a001e019fc2f5fa8d8a2035d0e9dd8539d

commit 730760a001e019fc2f5fa8d8a2035d0e9dd8539d
Author: satorux <satorux@chromium.org>
Date: Wed Mar 02 04:22:32 2016

Rename raw_image() to image_bytes() in UserImage

raw_image() was a misnomer, because this function returns
data bytes representation of an image encoded in web-compatible
format such as JPEG for WebUI (ex. chrome://userimage/),
rather than raw bitmap data.

Along the way, get rid of DiscardRawImage() that is not
used at all

BUG= 590630 
TEST=everything builds as before
TBR=achuith@chromium.org for components/user_manager, bshe@chromium.org for components/wallpaper

Review URL: https://codereview.chromium.org/1747843002

Cr-Commit-Position: refs/heads/master@{#378687}

[modify] https://crrev.com/730760a001e019fc2f5fa8d8a2035d0e9dd8539d/chrome/browser/chromeos/login/users/avatar/user_image_loader.cc
[modify] https://crrev.com/730760a001e019fc2f5fa8d8a2035d0e9dd8539d/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc
[modify] https://crrev.com/730760a001e019fc2f5fa8d8a2035d0e9dd8539d/chrome/browser/ui/webui/chromeos/image_source.cc
[modify] https://crrev.com/730760a001e019fc2f5fa8d8a2035d0e9dd8539d/chrome/browser/ui/webui/options/chromeos/user_image_source.cc
[modify] https://crrev.com/730760a001e019fc2f5fa8d8a2035d0e9dd8539d/components/user_manager/user.cc
[modify] https://crrev.com/730760a001e019fc2f5fa8d8a2035d0e9dd8539d/components/user_manager/user.h
[modify] https://crrev.com/730760a001e019fc2f5fa8d8a2035d0e9dd8539d/components/user_manager/user_image/user_image.cc
[modify] https://crrev.com/730760a001e019fc2f5fa8d8a2035d0e9dd8539d/components/user_manager/user_image/user_image.h
[modify] https://crrev.com/730760a001e019fc2f5fa8d8a2035d0e9dd8539d/components/wallpaper/wallpaper_manager_base.cc
[modify] https://crrev.com/730760a001e019fc2f5fa8d8a2035d0e9dd8539d/components/wallpaper/wallpaper_manager_base.h

Project Member

Comment 4 by bugdroid1@chromium.org, Mar 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5820ae933247dc363ba3ae51220acd64ba3488b0

commit 5820ae933247dc363ba3ae51220acd64ba3488b0
Author: satorux <satorux@chromium.org>
Date: Fri Mar 11 05:13:04 2016

Crop the user-specified profile image for WebUI

This patch fixes a bug where the user-specified profile image
wasn't cropped for WebUI thus the image was displayed weirdly
in the lock screen and the settings.

The root cause of the problem was that the original image data
bytes (not cropped, and can be big) were used for WebUI.

Along the way, get rid of UserImage.RecodedJpegSize UMA
because it's not defined in tools/metrics/histograms/histograms.xml

BUG= 590630 
TEST=follow steps in the bug

Review URL: https://codereview.chromium.org/1748423005

Cr-Commit-Position: refs/heads/master@{#380512}

[modify] https://crrev.com/5820ae933247dc363ba3ae51220acd64ba3488b0/chrome/browser/chromeos/login/users/avatar/user_image_loader.cc
[modify] https://crrev.com/5820ae933247dc363ba3ae51220acd64ba3488b0/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc
[modify] https://crrev.com/5820ae933247dc363ba3ae51220acd64ba3488b0/components/user_manager/user_image/user_image.cc
[modify] https://crrev.com/5820ae933247dc363ba3ae51220acd64ba3488b0/components/user_manager/user_image/user_image.h

Status: Fixed (was: Started)
forgot to close.

Comment 6 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 7 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 8 by dchan@google.com, May 30 2017

Labels: VerifyIn-60

Comment 9 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 10 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment