File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ class ImgExtended {
55 nativeImageViewProtected : com . nativescript . image . DraweeView ;
66 @cssProperty colorMatrix : number [ ] ;
77 [ colorMatrixProperty . setNative ] ( value : number [ ] ) {
8+ if ( ! value ) {
9+ this . nativeImageViewProtected . setColorFilter ( null ) ;
10+ return ;
11+ }
812 const arr = Array . create ( 'float' , value . length ) ;
913 for ( let index = 0 ; index < value . length ; index ++ ) {
1014 arr [ index ] = value [ index ] ;
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class ImgExtended3 {
4444 _filter : CIFilter ;
4545
4646 filteredImage ( image : UIImage , filter : CIFilter ) {
47- if ( image !== null ) {
47+ if ( image !== null && filter !== null ) {
4848 const tmp = CIImage . alloc ( ) . initWithImage ( image ) ;
4949 this . _filter . setValueForKey ( tmp , 'inputImage' ) ;
5050
@@ -55,7 +55,7 @@ class ImgExtended3 {
5555 // CGImageRelease(cgim);
5656 return filteredImage ;
5757 }
58- return null ;
58+ return image ;
5959 }
6060 _applyColorFilter ( image ) {
6161 if ( image ) {
You can’t perform that action at this time.
0 commit comments