luberda-molinet / FFImageLoading

Image loading, caching & transforming library for Xamarin and Windows
MIT License
1.42k stars 377 forks source link

SVG - frame by frame animations support #1130

Open ederjbezerra opened 6 years ago

ederjbezerra commented 6 years ago

Description

Hey guys, how can I make a svg animation start on xamarin with ffimageloading? The image is showed but without animation. I'm doing it through xaml.

Steps to Reproduce

Expected Behavior

Actual Behavior

Basic Information

Screenshots

Reproduction Link / Code

EmilAlipiev commented 6 years ago

you should fill the form. this question is incomplete. give some code you are trying

daniel-luberda commented 6 years ago

SVG Animations are not supported as FFImageLoading only supports frame by frame animations. Unluckily, I don't think it could be implemented. We could support SVG frame by frame animations though:

<svg version="1.1" baseProfile="tiny" id="svg-root"
  width="100%" height="100%" viewBox="0 0 480 360"
  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">

   <image width="320" height="240" xlink:href="test1.jpg">
      <animate id='frame_0' attributeName='display' values='inline;none'
               dur='0.5s' fill='freeze' begin="0s" repeatCount="indefinite"/>
   </image>

   <image width="320" height="240" xlink:href="test2.jpg">
      <animate id='frame_1' attributeName='display' values='none;inline'
               dur='0.5s' fill='freeze' begin="0.5s" repeatCount="indefinite" />
   </image>

</svg>