Issue description
Looking for a cross-platform way to create image thumbnail files asynchronously. Titanium is able to read an image file asynchronously into a buffer and then a blob. If we assign that blob to the image property of an ImageView, it displays as I expect. However, the blob is not recognised as an image by any of the Ti.Blob.image* methods. The blob has a mime type of "application/octet-stream" and a height and width of 0. Meanwhile Android is able to get height and width properly.
Steps to reproduce
Launch sample app. You can see that the fishImage ImageView loads its image directly from a file path in its "image" property.
earthImage is loaded in index.js asynchronously using a file stream. Once the file contents are read completely, they are assigned to the image property of $.earthImage.
Notice, the blob you get as a result of "earthBuffer.toBlob()" can't be used for any other image manipulation (e.g. creating thumbnails). It doesn't have a valid mimeType, height, or width on iOS.
E.G.
$.earthImage.image = earthBuffer.toBlob();
Ti.API.info( $.earthImage.image.height + ' . '+ $.earthImage.image.width + ' . '+ $.earthImage.image.mimeType);
Android
04-24 15:11:03.812: I/TiAPI(28395): 1600 . 2560 . application/octet-stream
iOS
[INFO] : 0 . 0 . application/octet-stream
Marked for future release, so removing due date. Please re-add if this is incorrect.
Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/5901
Reopening the issue as issue seems to appear incorrect on Android. Verified with environment: Appcelerator Studio:3.4.0.201408180158 Sdk:3.4.0.v20140815142514 alloy:1.5.0-dev titanium:3.4.0-dev titanium-code-processor:1.1.1 acs:1.0.16 npm:1.3.2 OS:Maverick(10.9.4) xcode: Xcode6Beta5 Device:iPhone5s(v8.0),Nexus7(v4.4.2) Getting Result as : On iOS:
On Android:
Now iOS shows the dimension but android does not shows the same.
This issue was for IOS and it still remain resolved. Will clone a bug for the android issue.
Verified with environment: Appcelerator Studio:3.4.0.201408270900 Sdk:3.4.0.v20140827165712 alloy:1.5.0-dev titanium:3.4.0-dev titanium-code-processor:1.1.1 acs:1.0.16 npm:1.3.2 OS:Maverick(10.9.4) xcode: Xcode6Beta6 Device:iPhone5s(v8.0) For iOS Working as expected. Not working for android. Already bug logged TIMOB-17567 Hence closing the issue.