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

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: Reuse 'orientation' field to make different transformation formats exclusive. 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..72d0f1ee4398e0d87957077df5c5487854c8aad5 100644
--- a/ui/file_manager/image_loader/image_loader.js
+++ b/ui/file_manager/image_loader/image_loader.js
@@ -71,6 +71,9 @@ function ImageLoader() {
if (typeof request.orientation === 'number') {
request.orientation =
ImageOrientation.fromDriveOrientation(request.orientation);
+ } else if (request.orientation) {
+ request.orientation =
+ ImageOrientation.fromRotationAndScale(request.orientation);
mtomasz 2017/02/17 02:49:18 I know the logic here already did it, but it shoul
yamaguchi 2017/02/17 03:44:40 As discussed offline, we'll need to handle the cir
} else {
request.orientation = new ImageOrientation(1, 0, 0, 1);
}
@@ -127,4 +130,4 @@ ImageLoader.getInstance = function() {
if (!ImageLoader.instance_)
ImageLoader.instance_ = new ImageLoader();
return ImageLoader.instance_;
-};
+};

Powered by Google App Engine
This is Rietveld 408576698