react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Image.getSize on Android is weird

Open 12d opened this issue 10 years ago • 4 comments

Running 'Image.getSize' twice, the first time, I can get the size of image, but the second time get zero.

    componentDidMount(){
        Image.getSize('http://facebook.github.io/react/img/logo_og.png',function(height, width){
            console.log(height);
            console.log(width)
        })
        Image.getSize('http://facebook.github.io/react/img/logo_og.png',function(height, width){
            console.log(height); //output: 0 (iOS is OK, Android gets zero)
            console.log(width) // output: 0 (iOS is OK, Android gets zero)
        })
    },

12d avatar Jun 20 '16 11:06 12d

What happens if you do it for a different source?

281330 avatar Jun 20 '16 13:06 281330

Thank you for this reporting.

It has recently been fixed by 99e2a67b3992c3d76fa519a5880d7abc5c57b7a2 and it will be landed soon into 0.28 or 0.29-rc.

I'll close this issue, please feel free to reopen it if not fixed your issue.

charpeni avatar Jun 20 '16 13:06 charpeni

@facebook-github-bot close

charpeni avatar Jun 20 '16 13:06 charpeni

@charpeni tells me to close this issue. If you think it should still be opened let us know why.

ghost avatar Jun 20 '16 13:06 ghost