Closed Bug 840038 Opened 11 years ago Closed 11 years ago

[MMS][User Story] Image rescaling to 300kB

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

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

RESOLVED FIXED
blocking-b2g leo+
Tracking Status
b2g18 --- fixed
b2g-v1.1hd --- fixed

People

(Reporter: pdol, Assigned: steveck)

References

()

Details

(Keywords: feature)

Attachments

(1 file, 1 obsolete file)

UCID: Messages-013

User Story:
As a user, when I send an MMS with an image larger than 300kB, the image will be rescaled to 300kB, and I will be able to include a minimum of 1000 characters of text in addition to two images to ensure I can send an MMS message with one or two images and description to another device.
Assignee: nobody → schung
We need to apply this util function to attached image before sending the message. Other implementation will be submitted when attachment ability is landed.
Attachment #716907 - Flags: review?(fbsc)
Covered in the MMS spec page 3
https://www.dropbox.com/s/zc3hhd1mxi16p4w/MMS.pdf

Comments and feedback welcome!
Depends on: 840044, 840082
Whiteboard: [LOE:S]
Whiteboard: [LOE:S]
(In reply to Peter Dolanjski [:pdol] from comment #0)
> As a user, when I send an MMS with an image larger than 300kB,
> the image will be rescaled to 300kB, and I will be able to
> include a minimum of 1000 characters of text in addition to two
> images to ensure I can send an MMS message with one or two
> images and description to another device.

This bug seems to duplicate bug 792327, which is a conformance bug for restricting several image/audio/video attachment attributes.  For example, in RESTRICTED creation mode, Image Basic & Image Rich content classes in total limits message size to 100KB.  And in FREE creation mode, "a terminal MAY allow the user to add any content to the MM."
Whiteboard: [by 3/8]
(In reply to Peter Dolanjski [:pdol] from comment #0)
> UCID: Messages-013
> 
> User Story:
> As a user, when I send an MMS with an image larger than 300kB, the image
> will be rescaled to 300kB, and I will be able to include a minimum of 1000
> characters of text in addition to two images to ensure I can send an MMS
> message with one or two images and description to another device.

Want to clarify on the 300KB value. the 300KB value here should really be the operator network policy size for MMS, correct? so this is a variable depending on the value specified (this will be an customization item).
Flags: needinfo?(pdolanjski)
The 300kb value is used to meet the requirements of a specific operator that states that an MMS message must allow for a minimum of 2 images plus 1000 characters of text, which is where the 300kb max comes from in a 600kb message max.

The specific requirement is:

"Image insertion support - The size of the single image will be optimized in order to allow the insertion of two images dependent on the maximum message size for an MM defined in the operator settings document."
Flags: needinfo?(pdolanjski)
Just want to double confirm: 
2+ images + 1000 characters <= 300kb
Please correct me if it's not the case.
Steve, I have the same doubt... Is this a carrier-dependent param? or a standard one? If it is a carrier one... Is there any way for retrieving it? Thanks!
(In reply to Borja Salguero [:borjasalguero] from comment #7)
> Steve, I have the same doubt... Is this a carrier-dependent param?

Yes.

> or a standard one?

No standard size limitation on MMS specifications.

> If it is a carrier one... Is there any way for retrieving it? Thanks!

No. There might be some MMS connectivity parameters in SIM card, but maximum message size is not included.
Hi Vicamo,
However MMS 1.3 let us to send a limit of 600Kb... We need to identify at least the version of MMS available for setting this 'limit'. Is there any way of checking the version of MMS of the carrier? Maybe it should be a config param when creating the build.
Flags: needinfo?(vyang)
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #8)
> No. There might be some MMS connectivity parameters in SIM card, but maximum
> message size is not included.

To be more clear, MMS-CONF defines several "content classes". For example, implementation that conforms "Text" content class must be capable of sending text messages not larger than 30KB.  For "Image-Basic" content class, implementation must be able to send images sized less than 30KB and smaller than 160x120 in width and height. There is no specific restrictions for attachments larger than 30KB for Text or Image-Basic content class.

The only restriction comes from RESTRICTED creation mode.  When in this mode, implementation must only send messages with size or resolution or formats specified in the conforming content classes. That is, in RESTRICTED creation mode, you SHALL NOT send a Text content class message larger than 30KB.  There is no such restriction in WARNING or FREE creation mode.
Flags: needinfo?(vyang)
(In reply to Borja Salguero [:borjasalguero] from comment #9)
> Hi Vicamo,
> However MMS 1.3 let us to send a limit of 600Kb

No. No limits in FREE or WARNING creation mode and 600KB is not a "maximum" limit. MMS-CONF v1.3 section 7.1.11:

  Clients/terminals conforming to MM Content Class Megapixel SHALL support a maximum
  MM size of at least 600 KB in retrieval and presentation.

> We need to identify at least the version of MMS available for setting this 'limit'.
> Is there any way of checking the version of MMS of the carrier? Maybe it should be a
> config param when creating the build.

We do gets MMS version in every reponse, but that won't help in this case. Besides, that value seems meaningless because it varies when we change our own version value.
Thanks for the info Vicamo! ;) Now everything it's more clear
First patch landed in https://github.com/mozilla-b2g/gaia/pull/8254/commits. We need to apply this rescaling utility while adding image attachment.
Blocks: mms-p1
Per partner and release-driver discussions, marking blocking- until all MMS functionality in bug 849867 is complete, allowing it all to be uplifted at once to avoid SMS bustage.
blocking-b2g: leo+ → -
Flags: in-moztrap?
what's the latest here? thanks
leo+ as this is a part of MMS. No_UPLIFT for now before the whole MMS is completed
blocking-b2g: - → leo+
Whiteboard: [by 3/8] → NO_UPLIFT
Whiteboard: NO_UPLIFT → [NO_UPLIFT]
Attachment #716907 - Flags: review?(fbsc) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
please add the master commit hash for future uplifts.
Thanks for the reminder. Here is the commit with hash:
https://github.com/steveck-chung/gaia/commit/f5ed5435f8b19ddfac3e715732ff97fda3594498
We need the hash that landed in master :)

that's : https://github.com/mozilla-b2g/gaia/commit/16bb4eb76b240a3f5f7e080bdc1864e0f6148729

Thanks Steve !
Whiteboard: [NO_UPLIFT]
v1-train: a302fb3d8eec41dfb509f065b8d3d5b1bf91c111
The code to resize the image is there, but it isn't used by the code to attach an image
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
We should also try to leave some room for text in the message as well, perhaps only use 90% of the maximum possible for the resize function?  Check in the settings.js for the max value
Attachment #751199 - Flags: review?(gnarf37)
Corey, Steve, could you please file a new bug ?

The original patch was already uplifted and I fear it makes things difficult to follow for uplifters.
Comment on attachment 751199 [details]
Patch2: Apply image resizing to composer attachment

Made a few comments in the pull request.  Lets also make a new bug as julien suggests.
Attachment #751199 - Flags: review?(gnarf37) → review-
Attachment #751199 - Attachment is obsolete: true
Blocks: 873758
I create a follow up bug 873758. Close this one since it's already uplifted.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Flags: in-moztrap? → in-moztrap+
Keywords: late-l10n
Keywords: late-l10n
v1.1.0hd: 08f5ca19fdda8f96c2acb82de13176a6d590047f
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: