Closed Bug 931125 Opened 6 years ago Closed 6 years ago

[Gallery] [Camera] We have to take into account the screen pixel ratio when checking if the thumbnail fills the screen

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:hd+, b2g-v1.1hd fixed, b2g-v1.2 fixed)

RESOLVED FIXED
1.3 Sprint 4 - 11/8
blocking-b2g hd+
Tracking Status
b2g-v1.1hd --- fixed
b2g-v1.2 --- fixed

People

(Reporter: dmarcos, Assigned: dmarcos)

References

Details

Attachments

(1 file, 1 obsolete file)

38 bytes, text/x-github-pull-request
djf
: review+
Details | Review
In the Gallery and the Camera app we check if the EXIF thumbnail is large enough to fill the device screen. We only make use of window.innerWidth and window.innerHeight but we don't not taking into account the device pixel ratio (window.devicePixelRatio). Thumbnails will be stretched in HD devices and the rendered images will look blurry. Below the correct way to calculate the minimum size for a thumbnail:

var thumbnailMinimumWidth = window.innerWidth * window.devicePixelRatio;    
var thumbnailMinimumHeight = window.innerHeight * window.devicePixelRatio;
blocking-b2g: --- → hd?
Required for bug 928614
blocking-b2g: hd? → hd+
Diego, will you also take this one?
Flags: needinfo?(dmarcos)
Assignee: nobody → dmarcos
Flags: needinfo?(dmarcos)
Yes. I got this one
No longer blocks: 928614
Depends on: 928614
Depends on: 931093
No longer depends on: 928614
Blocks: 928614
Attached file Pull Request (obsolete) —
Attached file Pull Request
Attachment #829392 - Attachment is obsolete: true
Attachment #829393 - Flags: review?(dflanagan)
Target Milestone: --- → 1.3 Sprint 4 - 11/8
Comment on attachment 829393 [details] [review]
Pull Request

Looks good to me, if you fix the error in the metadata parser file.

I can't do a full review since this is a PR against one of your own branches rather than against master, but from what I can see the code looks fine.
Attachment #829393 - Flags: review?(dflanagan) → review+
You need to log in before you can comment on or make changes to this bug.