Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[expo-optimize] Removes alpha channel #1373

Closed
janaagaard75 opened this issue Dec 17, 2019 · 4 comments
Closed

[expo-optimize] Removes alpha channel #1373

janaagaard75 opened this issue Dec 17, 2019 · 4 comments
Labels

Comments

@janaagaard75
Copy link

Running npx expo-optimize removed the alpha channel on this image: https://github.com/janaagaard75/desert-walk/blob/master/assets/50713-transparent.png.

(I hope this is enough information to reproduce the bug.)

@brentvatne brentvatne changed the title expo-optimize removed alpha channel [expo-optimize] Removes alpha channel Dec 17, 2019
@brentvatne brentvatne added the help wanted Extra attention is needed label Dec 17, 2019
@janaagaard75
Copy link
Author

janaagaard75 commented Dec 18, 2019

I played around with the the command options for sharp-cli, but adding --alphaQuality 100 or --quality 100 still produced the same optimized image, that doesn't have an alpha channel / or a quite different alpha channel.

I created an issue on the sharp-cli project: vseventer/sharp-cli#31, hoping that they can help.

Update: sharp-cli sent me to sharp, so the issue above has been superseded with this one: lovell/sharp#2013.

@janaagaard75
Copy link
Author

The issue in Sharp (lovell/sharp#2013) is fixed, but it hasn't been released yet. Keeping this issue open until then.

@janaagaard75
Copy link
Author

A new version of sharp has been released fixing lovell/sharp#2013, so now we have to wait for an update to sharp-cli that references this updated version of sharp.

@janaagaard75
Copy link
Author

sharp-cli has just been updated, so this issue can finally be closed.

(I would be nice if expo-optimzed used sharp directed instead of through sharp-cli, because that sharp is updated more often, and it would remove the necessity to install sharp-cli. I have no idea about how big a task this is, though.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants