Skip to content
Discussion options

You must be logged in to vote

Hi @Themrpie
I don't fully understand what your problem is, but these lines of code may help you.
Additionally, there is documentation on how to use Mask , but many people still cannot use it

function App(): JSX.Element {
  const skimage = useImage('https://picsum.photos/200/300');
  // const svg = useSVG(require('./assert/svg/Vector.svg'));
  const ref = useCanvasRef();
  useEffect(() => {
    setTimeout(() => {
      // you can pass an optional rectangle
      // to only save part of the image
      const image = ref.current?.makeImageSnapshot();
      if (image) {
        // you can use image in an <Image> component
        // Or save to file using encodeToBytes -> Uint8Array
        c…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Themrpie
Comment options

@hungtooc
Comment options

@Themrpie
Comment options

@hungtooc
Comment options

@Themrpie
Comment options

Answer selected by Themrpie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants