New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 684921 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Feature

Blocked on:
issue 665488



Sign in to add a comment

Consider supporting other bitmap pixel formats

Project Member Reported by junwei...@intel.com, Jan 25 2017

Issue description

Steps to reproduce the problem:
Only ARGB/BGRA_8888 can work now, consider supportting for other bitmap pixel formats.

What is the expected behavior?

What went wrong?

Did this work before? N/A 

Chrome version:   Channel: stable
OS Version: 
Flash Version:
 

Comment 1 by mcasas@chromium.org, Jan 25 2017

Cc: mcasas@chromium.org
Components: Blink>ImageCapture
Labels: ShapeDetection
 Issue 684901  has been merged into this issue.

Comment 3 by mcasas@chromium.org, Apr 12 2017

Blockedon: 665488

Comment 4 by mcasas@chromium.org, May 11 2017

Labels: Pri-3

Comment 5 by junwei...@intel.com, Jun 22 2017

I don't think other pixel formats need to be supported because kN32_SkColorType is used in [1] by default when decoding loaded image, the reason of it is kN32_SkColorType is an alias for whichever 32bit ARGB format is the "native" form for skia's blitters. so use this if we don't have a swizzle preference
for 32bit pixels as commented in [2]. 

[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp?l=112
[2] https://cs.chromium.org/chromium/src/third_party/skia/include/core/SkImageInfo.h?l=64

Comment 6 by mcasas@chromium.org, Jun 22 2017

Cc: -mcasas@chromium.org junwei...@intel.com
Labels: ExternalContributor
Owner: mcasas@chromium.org
Status: Assigned (was: Unconfirmed)
#5 that makes sense. Could you rewrite the comment in [1]
so that it's not a TODO? (but still cite this bug for 
reference)? Then we can close it.

(assigning to me as placeholder).

[1] https://cs.chromium.org/chromium/src/services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java?type=cs&q=shape+detection+684921&sq=package:chromium&l=29
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 24 2017

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

commit 4419510166945a42be685c344f02db41335c44db
Author: junweifu <junwei.fu@intel.com>
Date: Sat Jun 24 19:36:46 2017

ShapeDetection: Remove TODOs and handle null Bitmap case.

kN32_SkColorType is used in [1] by default when decoding loaded image because
it's an alias for whichever 32bit ARGB format is the "native" form for skia's
blitters. so use it if we don't have a swizzle preference for 32bit pixels
as commented in [2]. So remove TODOs about supporting other pixel format.
Handle the case when BitmapUtils.convertToBitmap() returns null in FaceDetectionImpl.

[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp?l=112
[2] https://cs.chromium.org/chromium/src/third_party/skia/include/core/SkImageInfo.h?l=64

BUG= 684921 ,  684930 

Cq-Include-Trybots: master.tryserver.chromium.mac:mac_optional_gpu_tests_rel
Change-Id: Ib353cbd1ffb9c1bd1bdc570f0610b7671ef86639
Reviewed-on: https://chromium-review.googlesource.com/545256
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482159}
[modify] https://crrev.com/4419510166945a42be685c344f02db41335c44db/services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionImpl.java
[modify] https://crrev.com/4419510166945a42be685c344f02db41335c44db/services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java
[modify] https://crrev.com/4419510166945a42be685c344f02db41335c44db/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java
[modify] https://crrev.com/4419510166945a42be685c344f02db41335c44db/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java
[modify] https://crrev.com/4419510166945a42be685c344f02db41335c44db/services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java

Comment 8 by mcasas@chromium.org, Jun 27 2017

Status: WontFix (was: Assigned)

Sign in to add a comment