-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle encrypted (maybe also encoded) files #29
Comments
Very interesting! I had to mark
Does this not work for your request data because its |
Thanks for your fast reply and interest in my use case.
I can provide a decrypting
I debugged this and |
I'm curious what's the concern here? App directories are inaccessible to other apps. I can't think of good ideas to make ZoomableImage(
image = ZoomableImageSource.encrypted(…),
) |
Hi Saket,
I just want to keep the "attack surface" small. Android is very fragmented and at least until Android 12 you could utilize
I started digging into I'm quite busy the upcoming week but after that I could create a PR for the first step if you like. |
Sure, please go ahead! |
Alternatively, could you provide a custom disk cache to Coil that is backed by a fake in-memory file system? |
Hi, forked your repo, added the methods to The only way I got it working is to provide a Will need to spend some more time looking into this. Due to a lack of time in the next days, it could take another week or two. But I'm on it, after that I will try |
On a second thought, please disregard that. A fake disk cache won't help because I went ahead and implemented SubSamplingImageSource.rawSource(). Wanna try it out on |
Many thanks! I gave it a try and it's working fine. Will test the approach with |
So basically copied the From my side, the issue would be resolved with the new method. Thanks again! Maybe one final question, depending on the answer this would be worth a new issue then. Coil offers |
Glad to hear!
Yes please, let's move this to a new discussion so that it's searchable by others. |
Hi,
many thanks for creating and sharing this library. I tried migrating from SSIV (subsampling-scale-image-view) and failed because in my use case the files are encrypted. The access happens thru SAF. In SSIV I could provide a
BitmapRegionDecoder
that handled the decryption.I think I could make it work by implementing the interface
SubSamplingImageSource
that is currentlysealed
.In a second step I would like to use
ZoomableAsyncImage
instead ofSubSamplingImage
. I pass a custom data type into theImageRequest.Builder
and register a customFetcher
for Coil that handles decryption. Because of that yourZoomableAsyncImage
is already able to display my encrypted images however without subsampling. In the fileCoilImageSource.kt
the methodImageResult.toSubSamplingImageSource(...)
would need to be adjusted to be able to map custom request data to customSubSamplingImageSource
.Likely this is just one possible solution.
Many thanks in advance. I know that my use case might be quite rare.
The text was updated successfully, but these errors were encountered: