Skip to content
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

No animated Gif image loaded when using bridge.imageLoader #15427

Closed
BANG88 opened this issue Aug 9, 2017 · 1 comment
Closed

No animated Gif image loaded when using bridge.imageLoader #15427

BANG88 opened this issue Aug 9, 2017 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@BANG88
Copy link

BANG88 commented Aug 9, 2017

Is this a bug report?

No.

Have you read the Contributing Guidelines?

Yes.

Environment

  1. react-native -v: react-native-cli: 2.0.1 react-native: 0.47.1

  2. node -v: v8.1.4

  3. npm -v: 5.3.0

  4. yarn --version: 0.27.5

  • Target Platform: IOS
  • Development Operating System: macOS

I have searched Google , stackoverflow and React-Native repo but no lucky, so asking help here.

I using the following snippets for load image , both local image and remote image are working very well except gif image.

When downloading Gif image, the UIImage* image only display the first frame and can not convert to NSData.

The problem here is i want a NSData object from UIImage, but seems like the UIImage is not an animated image when download block has done.

// load image
[_bridge.imageLoader loadImageWithURLRequest:d.source.request
        size:d.source.size
        scale:d.source.scale
        clipped:NO
        resizeMode:RCTResizeModeStretch
        progressBlock:^(int64_t progress, int64_t total) {
            NSLog(@"%lld %lld", progress,total);
        }
        partialLoadBlock:nil
        completionBlock:^(NSError* error, UIImage* image) {
            if (image) {
                dispatch_async(dispatch_get_main_queue(), ^{
                    
                    // if the image is an gif file, the UIImage only display the first frame.

                });
            }
        }];

repo: https://github.com/merryjs/photo-viewer/blob/refactor-image-loader/ios/MerryPhotoView.m#L222

@hramos
Copy link
Contributor

hramos commented Aug 15, 2017

This issue looks like a question that would be best asked on StackOverflow.

StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.

Will close this as this is really a question that should be asked on StackOverflow.

@hramos hramos closed this as completed Aug 15, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Aug 15, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants