Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: ui/file_manager/image_loader/image_loader.js

Issue 2691933007: Rotate an image bitmap in ImageLoader extension when loading detached. (Closed)
Patch Set: update comment. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/image_loader/image_loader.js
diff --git a/ui/file_manager/image_loader/image_loader.js b/ui/file_manager/image_loader/image_loader.js
index 3f26ea17243b17f50ecdffe9e70c4b9fa64ebae9..3e30401ec5d49c670ed6d4bf574547b0cf9708ab 100644
--- a/ui/file_manager/image_loader/image_loader.js
+++ b/ui/file_manager/image_loader/image_loader.js
@@ -68,7 +68,11 @@ function ImageLoader() {
// Ignore the error.
}
};
- if (typeof request.orientation === 'number') {
+ if (request.image_transform) {
mtomasz 2017/02/16 08:53:41 Instead of overriding, can we simply pass the "ori
yamaguchi 2017/02/16 14:01:18 Done.
+ // 'image_transform' option overrides 'orientation' option.
+ request.orientation =
+ ImageOrientation.fromRotationAndScale(request.image_transform);
+ } else if (typeof request.orientation === 'number') {
request.orientation =
ImageOrientation.fromDriveOrientation(request.orientation);
} else {
@@ -127,4 +131,4 @@ ImageLoader.getInstance = function() {
if (!ImageLoader.instance_)
ImageLoader.instance_ = new ImageLoader();
return ImageLoader.instance_;
-};
+};

Powered by Google App Engine
This is Rietveld 408576698