Closed
Bug 1146393
Opened 9 years ago
Closed 9 years ago
[Shinano][Aries] No attachment preview visible for pictures over 5MB
Categories
(Firefox OS Graveyard :: Gaia::SMS, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: gerard-majax, Assigned: julienw)
References
Details
(Whiteboard: [sms-most-wanted][Spark][sms-sprint-2.2S14])
Attachments
(1 file)
STR: 0. Tap "attach" in SMS, select Camera 1. Take a picture Expected: Preview is visible in compose field Actual: If the resulting image is over 5MB, then no preview is generated.
Assignee | ||
Comment 1•9 years ago
|
||
So it's done on purpose in [1] but we could configure it because we can know how much memory we have since v2.0: navigator.getFeature('hardware.memory').then(function(mem) { }) [1] https://github.com/mozilla-b2g/gaia/blob/36e8153edd11dfbd36df26eeac9dc19216137d62/apps/sms/js/attachment_renderer.js#L9-L11
Whiteboard: [sms-most-wanted]
Assignee | ||
Comment 2•9 years ago
|
||
We could encapsulate this in Settings.js.
Reporter | ||
Comment 3•9 years ago
|
||
Marking as blocking bug 1162197 for tracking purpose mostly, I'm not sure it's such a big deal for now, we can live with it; but it's good people can easily find about.
Blocks: spark-device
Assignee | ||
Comment 5•9 years ago
|
||
The limitation comes from a time where we didn't use moz-samplesize and we used canvas to resize the thumbnail in-memory. I think we could move the limitation a lot higher now, without even checking the available memory. Alexandre, could you please share what is the typical size of a picture taken with Aries?
Flags: needinfo?(lissyx+mozillians)
Reporter | ||
Comment 6•9 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #5) > The limitation comes from a time where we didn't use moz-samplesize and we > used canvas to resize the thumbnail in-memory. I think we could move the > limitation a lot higher now, without even checking the available memory. > > Alexandre, could you please share what is the typical size of a picture > taken with Aries? It depends on the picture itself, but you can expect something around 3.5MB to 5.5MB is common.
Flags: needinfo?(lissyx+mozillians)
Assignee | ||
Updated•9 years ago
|
Whiteboard: [sms-most-wanted] → [sms-most-wanted][spark]
Assignee | ||
Updated•9 years ago
|
Whiteboard: [sms-most-wanted][spark] → [sms-most-wanted][Spark]
Assignee | ||
Comment 7•9 years ago
|
||
Hey Steve, what do you think of this? I tested with a Flame master with the memory set to 319MB and this image: DSC_0141.JPG JPEG 4928x3264 4928x3264+0+0 8-bit sRGB 8.303MB 0.040u 0:00.029 So it's 8MB and 16MP. It worked fine (albeit quite slow). I even wonder if we shouldn't remove the limit altogether (the main issue with big images is when resizing to send, not really when displaying the thumbnail, right?) but discussing with Francisco we thought it's better to still keep it so that it's easier to change for some target devices.
Assignee: nobody → felash
Attachment #8617522 -
Flags: review?(schung)
Comment 8•9 years ago
|
||
Comment on attachment 8617522 [details] [review] master github PR This solution should be fine for spark, but maybe we can create another key for image-limitation-for-message in settings DB for real customizable solution.
Attachment #8617522 -
Flags: review?(schung) → review+
Assignee | ||
Comment 9•9 years ago
|
||
Yeah this could likely be customized per device.
Assignee | ||
Comment 10•9 years ago
|
||
master: https://github.com/mozilla-b2g/gaia/commit/0c0e988dca221e3294a0868f090956ee79c18a89 Thanks for reviewing !
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 11•9 years ago
|
||
Hmm maybe put this in app customize json is better than in settings: https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Market_customizations_guide. But it seems we will need to write some build script for it.
Assignee | ||
Comment 12•9 years ago
|
||
Nothing urgent anyway -- this can change once we use Service Workers too :)
Assignee | ||
Updated•9 years ago
|
Whiteboard: [sms-most-wanted][Spark] → [sms-most-wanted][Spark][sms-sprint-2.2s14]
Assignee | ||
Updated•9 years ago
|
Whiteboard: [sms-most-wanted][Spark][sms-sprint-2.2s14] → [sms-most-wanted][Spark][sms-sprint-2.2S14]
Reporter | ||
Comment 13•9 years ago
|
||
Sweet to see a 7.6MB picture with a thumbnail now :)
You need to log in
before you can comment on or make changes to this bug.
Description
•