Closed moonayyur closed 4 months ago
Probably introduced by https://github.com/image-js/image-js-typescript/pull/298
Can you make a PR with a fix?
@stropitek was there a reason why bitDepth
was choosen over depth
to start with ?
Maybe better to ask @targos since he worked on it but I think it was just for clarity. depth
does not specify the unit so it could as well could have been expressed in bytes, not bits.
There were three different names for the same thing (depth, bit depth, color depth) and we had to choose one for consistency.
In the function
encodePng
that usesfast-png
library :We have :
While :
bitDepth
ingetRawImage
has to be changed todepth
So here since we don't pass a value todepth
it uses the default value infast-png
which is 8 bits