mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
RTCImageStoreManager uses NSData instead of UIImage
Summary: Hi, I'm currently building an app that changes metadata, does some resizes, maybe watermarking ...etc. I want to use RCTImageStoreManager to store the original image in memory and allow me to command different modifications from javascript as it gives me more flexibility. As RCTImageEditingManager does for example. But currently the RTCImageStoreManager uses UIImage to store the image, the problem is that UIImage losses metadata. So i suggest we change it to NSData. Additionally I added a method to remove an image from the store. A related PR can be found here https://github.com/lwansbrough/react-native-camera/pull/100. Closes https://github.com/facebook/react-native/pull/3290 Reviewed By: javache Differential Revision: D2647271 Pulled By: nicklockwood fb-gh-sync-id: e66353ae3005423beee72ec22189dcb117fc719f
This commit is contained in:
committed by
facebook-github-bot-2
parent
83c9741dc9
commit
2b657003b7
@@ -61,8 +61,9 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
|
||||
- (void)cancel
|
||||
{
|
||||
if ([_handler respondsToSelector:@selector(cancelRequest:)]) {
|
||||
[_handler cancelRequest:_requestToken];
|
||||
__strong id strongToken = _requestToken;
|
||||
if (strongToken && [_handler respondsToSelector:@selector(cancelRequest:)]) {
|
||||
[_handler cancelRequest:strongToken];
|
||||
}
|
||||
[self invalidate];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user