question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Surface + ImageFilters not working properly on Android

See original GitHub issue

I use Surface (from gl-react-expo) and ImageFilters (from "react-native-gl-image-filters) for my project and on iOs it is working.

However, on Android photos with filters are shown properly when visible on the screen for the first time, but then when I scrolldown so given photo is out of screen and come back to it, it doesn’t display and only white area is shown.

Why is that? What is the possible fix for that?

Code extract below:

`import { Surface } from “gl-react-expo”; import ImageFilters from “react-native-gl-image-filters”;

        <Surface
          style={{
            width: photoWidth,
            height: photoHeight,
            borderRadius: 5,
          }}
        >
          <ImageFilters
            {...FILTERS.find((f) => f.id === tempFilter).filter}
            width={filterWidth}
            height={filterHeight}
          >
            {{
              uri: props.image_cropped,
            }}
          </ImageFilters>
        </Surface>

`

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Didiwloskicommented, Apr 11, 2021

@GregoryNative

I uploaded extract of my app which contains the code that is involved in displaying the list of filtered photo.

  1. The FlatList of photos that are presented in a form of a PhotoItem (FlatList is in AlbumDetailScreeen line 529)
  2. PhotoItem definition is in PhotoItem file. (Surface and filters are implemented in line 117)
  3. Filters palette is defined in file filters.js

https://snack.expo.io/tJjU-1yQP

Will be extremely grateful for your help on that 😉 Best, Adrian

0reactions
GregoryNativecommented, Aug 31, 2021

Hi. I don’t think that it’s related. In your code example you don’t use gl-react-image library as mention in thread which you shared.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to render surface shaders on Android 5 #230 - GitHub
Show an image with the filters of react-native-gl-image-filters applied ... Surface + ImageFilters not working properly on Android ...
Read more >
Photos not uploading to Surface Go from Android
Photos not uploading to Surface Go from Android ... However, Microsoft's instructions after that don't work and sync is not paused.
Read more >
androidx.compose.material - Android Developers
An ElevationOverlay is an overlay applied to the background color of Surface components, used to emphasize elevation in dark theme, where shadows are...
Read more >
Fun with Non-Photorealistic image filters | by Steve Liles
Output from “Comic Strip” for Android — not completely terrible, but not ... I'm now in the process of putting together this app...
Read more >
surface 0.2.0+6 | Flutter Package - Pub.dev
Shapeable, layered, intrinsincally animated container with convenient access to blurry ImageFilters, InkResponse, and HapticFeedback.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found