airbnb / lottie-web

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
MIT License
30.53k stars 2.87k forks source link

Bodymovin is converting png images to jpg #2261

Open rotemgrid opened 4 years ago

rotemgrid commented 4 years ago

When I export a sequence that includes some png files, it converts some of them to jpg to the images folder In assets, I checked "Enable compression"

It doesn't happen when:

  1. I check "Copy original assets" (in that case the file is not compressed and I'd like if it does due to file size limitation)
  2. I check "include in json"

I'd like to keep the compression and export with images folder without it to convert png to jpg

I cannot include screenshots because of confidentiality contract on this project

AE : 17.0.1 - which I downgraded because of other bugs with the latest versions bodymovin: 5.7.1

bodymovin commented 4 years ago

Hi, it usually converts raster layers that don't have an alpha channel to export. Could that be the case?

rotemgrid commented 4 years ago

Yes, that's it! can't it keep the png format without converting it to jpg?

bodymovin commented 4 years ago

Not sure I understand exactly the case. Doesn't "Copy original assets" work for your scenario?

rotemgrid commented 4 years ago

It did help, but I needed the reduction process because the size of the images was too big I know I can reduce the file size beforehand and did so to some of them I just don't understand why it converts the alpha channel png to jpg and not keeping it as png

anyway, I removed the alpha channel from those png's and managed to export it properly with compression

Thanks

bodymovin commented 4 years ago

@rotemgrid If you can share an example where the png shouldn't be converted, I can take a look. Perhaps there's an issue in the way the alpha channel is validated.