Closed
Bug 951341
Opened 11 years ago
Closed 11 years ago
[Flatfish][Gallery] thumbnails are created much larger than needed on Flatfish
Categories
(Firefox OS Graveyard :: Gaia::Gallery, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: djf, Assigned: gduan)
Details
Attachments
(1 file)
The following lines in gallery/js/MetdataParser.js cause really big thumbnails to be created for photos on Flatfish:
// If we generate our own thumbnails, aim for this size.
// Calculate needed size from longer side of the screen.
var THUMBNAIL_WIDTH = Math.round(
Math.max(window.innerWidth, window.innerHeight) *
window.devicePixelRatio / 4);
This code assumes that the biggest thumbanils will be needed when the device is in portrait mode and that there will be 4 columns of thumbnails in that mode. That assumption is no longer valid for the tablet form factor.
I'm not sure what the Flatfish resolution is, but I suspect that we're creating thumbnails two or three times too big, and that this is causing time and memory performance issues.
Reporter | ||
Comment 1•11 years ago
|
||
Needinfo George since he was the person working on this new form factor.
Flags: needinfo?(gduan)
Assignee | ||
Comment 2•11 years ago
|
||
Yes you're right.
On tablet, we have 4 pics in one row in portrait, which means each pictures must larger or equal 800/4 and also 6 pics in one row in pickView and landscape, so the max of width/height will be divided by 6 when device is not phone.
Please kindly check.
Thanks.
Attachment #8349168 -
Flags: review?(dflanagan)
Flags: needinfo?(gduan)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → gduan
Reporter | ||
Comment 3•11 years ago
|
||
Comment on attachment 8349168 [details]
PR to master
Looks good, but I think we can do even better and be more correct. Please see my suggestion on github. If that suggestion looks good to you, you can land it without requesting another review.
Attachment #8349168 -
Flags: review?(dflanagan) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•