CameraRoll.publishImage with RAW image file

Hello,

I have a script which download an image with an XMLHttpRequest as I describe it in this post.

It is working very well with JPEG or PNG pictures and so I gave I try with a RAW picture file. It is also working which is great except that picture dimension are wrong. I tried to add a width and a height to the image object passed to the CameraRoll.publishImage(image) function but not working. Here is my image Object: { path: 'path/to/my/image' , width: 3024, height: 4032 }. Is it correct ?

I tried with several RAW files from different manufacturer and all are well importer but some with the correct width and height and others with smaller width and height. I suspect that the CameraRoll.publishImage(image) takes the embedded JPEG of the RAW file to extract the width and height.

Thanks for your great work with fuse !!

Actually, the CameraRoll.publishImage interface doesn’t care about the file type at all. On iOS it’s a very thin interface over building a PHAssetChangeRequest with creationRequestForAssetFromImageAtFileURL (those Cocoa method names are a real trip). It grabs the path you pass in, validates it as a file that exists, and then sends it through, forwarding whatever errors or successes may occur back to you: Whatever dimensions come out on the other end when you pass a RAW file, that’s unfortunately whatever Apple’s APIs deemed accurate.

Thanks for your answer. It is working great with JPEGs anyway… Was just testing it.

Thanks again for your support and all the great work done with Fuse