Closed Bug 887164 Opened 11 years ago Closed 11 years ago

[MMS-Gallery] BMP and WBMP display support from MMS issue.

Categories

(Firefox OS Graveyard :: Gaia::Gallery, defect, P2)

ARM
Gonk (Firefox OS)

Tracking

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

RESOLVED FIXED
1.1 QE4 (15jul)
blocking-b2g leo+
Tracking Status
b2g18 --- fixed
b2g-v1.1hd --- fixed

People

(Reporter: leo.bugzilla.gaia, Assigned: yurenju)

References

Details

(Whiteboard: TaipeiMMS, [LeoVB+] )

Attachments

(2 files, 1 obsolete file)

1. Title : BMP & WBMP display support from MMS. 
2. Precondition : MMS should be working & device should support BMP & WBMP.
3. Tester's Action : 
         a. Receive MMS message with BMP image attached. Message is displayed in message list. Click on the image to open it.
         b. Repeat the same procedure with WBMP image.
4. Detailed Symptom (ENG.) : BMP & WBMP images are not displayed hence not able to Save them.
5. Detailed Symptom (KOR.) : 
6. Expected : BMP & WBMP images should be displayed and able to save them.
7. Reproducibility: Y
8. Frequency Rate : 100%
blocking-b2g: --- → leo+
Target Milestone: --- → 1.1 QE3 (26jun)
Hi ,

Gallery has been changed to scan all the images, which Gecko/Platform can display. However Gallery Open activity manifest has not been modified to support all the images.

diff --git a/apps/gallery/manifest.webapp b/apps/gallery/manifest.webapp
index 5759143..13fe5a6 100755
--- a/apps/gallery/manifest.webapp
+++ b/apps/gallery/manifest.webapp
@@ -18,7 +18,10 @@
           "image/jpeg", 
           "image/png", 
           "image/gif", 
-          "image/bmp"
+          "image/bmp",
+          "image/vnd.wap.wbmp",
+          "image/x-ms-bmp",
+          "image/x-bmp"
         ]
       }
     }, 
--
After adding the above code in Gallery Manifest, I am able to display BMP and WBMP images when I click them from Message thread. I am able to save BMP, which was received in MMS message but WBMP image saving is failing.
Test files attached for reference
Not a security problem, unhiding bug.
Group: core-security
I will take some time to investigate why wbmp image is no savable.
Assignee: nobody → schung
Target Milestone: 1.1 QE3 (26jun) → 1.1 QE4 (15jul)
Hi SC, We need to add wbmp format support in gecko for saving wbmp image. Could you confirm that this gecko changes is allowed for v1.1? Thanks.
Flags: needinfo?(schien)
I paste some log to http://pastebin.com/9yYYWsrQ. The main error log should be TypeMismatchError.
We need to add *.wbmp in devicestorage.properties, so that Device Storage can allow file with wbmp extension to be created in picture folder.
http://dxr.mozilla.org/mozilla-central/source/toolkit/content/devicestorage.properties#l2
Flags: needinfo?(schien)
We need to support *.wbmp so that Message app can save received WBMP image into picture folder.
Attachment #770109 - Flags: feedback?(doug.turner)
Comment on attachment 770109 [details] [diff] [review]
Add *.wbmp in devicestorage.properties

I've filed bug 889746 for the gecko part modification.
Attachment #770109 - Attachment is obsolete: true
Attachment #770109 - Flags: feedback?(doug.turner)
Hi, could we save the wbmp image as the PNG foramt? wbmp type is not in the storage white list now.
Flags: needinfo?(leo.bugzilla.gaia)
Whiteboard: TaipeiMMS
Hi Steve,

No,better not to change the original format of the image.

Also want to know, *.wbmp is not part of v1.1 ? (from comment #5 above)
Flags: needinfo?(leo.bugzilla.gaia)
Hi yuren, Could you help this issue? The wbmp decoder is already implemented in https://bugzilla.mozilla.org/show_bug.cgi?id=882526#c3. We need to replace the wbmp attachment blob to PNG blob:
https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/js/smil.js#L250 and 
https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/js/smil.js#L227
The attachment content here should apply wbmp lib to replace with PNG blob. Please also notice the exitPoint here because it's a the conversion is async function:
https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/js/smil.js#L170
We may also need to utilize activeReaders for checking the exitPoint here. Thanks!
Assignee: schung → yurenju.mozilla
Priority: -- → P2
Target Milestone: 1.1 QE4 (15jul) → 1.1 QE5
My WIP here:
https://github.com/yurenju/gaia/commit/4c7e1dd430698ef772b5a6e5072cdb785b5e87f7

Steve, could you give some feedback for this? thanks!
Flags: needinfo?(schung)
(In reply to Yuren Ju [:yurenju] from comment #13)
> My WIP here:
> https://github.com/yurenju/gaia/commit/
> 4c7e1dd430698ef772b5a6e5072cdb785b5e87f7
> 
> Steve, could you give some feedback for this? thanks!

Thanks for the great job! It look good except one part: We might also need to change the image name too(image.wbmp -> image.png), or it might return type mismatch error while saving the image because the extension and mimetype mismatch. Maybe the type checking will be ignored because gallery change the image saving from device storage to sd storage(sd storage saving will ignore the type checking), but saving the image with correct extension is still welcome. Please correct me if I'm wrong(and I will also test it later), thanks!
Flags: needinfo?(schung)
Target Milestone: 1.1 QE5 → 1.1 QE4 (15jul)
This will not land for today, so fixing the milestone. Yuren, any updates?
Flags: needinfo?(yurenju.mozilla)
Target Milestone: 1.1 QE4 (15jul) → 1.1 QE5
I will send a pull request today.
Flags: needinfo?(yurenju.mozilla)
here we go.

Steve, Mock messages for running sms app on desktop browser is broken because bug 893188, but I tested sms app on desktop browser by reverting commit of bug 893188 and it works.

let me know if any questions!
Attachment #776253 - Flags: review?(schung)
Target Milestone: 1.1 QE5 → 1.1 QE4 (15jul)
Comment on attachment 776253 [details] [review]
PR: https://github.com/mozilla-b2g/gaia/pull/10996

I've left some comments on github, it's a minor fixing so r=me with these update. Thanks!
Attachment #776253 - Flags: review?(schung) → review+
Merged, thank you Steve :D

https://github.com/mozilla-b2g/gaia/commit/aff2af8
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Hi Yuren, since you set the slide.blob at fist in the new patch, there is no need to set in again if attachment is not wbmp. Please fire another patch for fixing this issue. Sorry I should discover this small bug soon :(  (And thanks Paul for the nice catch!)
Steve, I landed a new commit for that. thanks Paul's eagle eye!

v1-train:
https://github.com/mozilla-b2g/gaia/commit/e6228f1
This is not a blocker for MMS for v1.1.  Does leo need to block on this?
Whiteboard: TaipeiMMS → TaipeiMMS, [LeoVB+]
v1.1.0hd: e6228f12357da9a1e04d39673485c82a925c66cd
v1.1.0hd: ce0fa1d52c1b44b29226cc472ff8381c2c165566
v1.1.0hd: e1f9a35ae70fe70189af8421ae52eadaa4e9da63
Blocks: 882526
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: