Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing 16-bit PNG files #213

Open
benjaminplanche opened this issue Feb 20, 2017 · 3 comments
Open

Writing 16-bit PNG files #213

benjaminplanche opened this issue Feb 20, 2017 · 3 comments

Comments

@benjaminplanche
Copy link

Hi there,

Thanks to @krasin (PR #76), the module supports the reading of 16bit PNG files.
As far as I can tell, it is however not true yet for the writing.

I am alas not familiar with the generic/png.c code, but it seems that passed images are automatically converted to 8bit format before writing (cf. l.208 and l.269).

@danieleghisi
Copy link

Hi, I also have this very same issue.
Does anyone knows how to save a tensor as 16-bit image?

Thanks,
Daniele

@b4zz4
Copy link

b4zz4 commented Sep 9, 2018

For my also this is a problem, lose the transparencies of the images

@b4zz4
Copy link

b4zz4 commented Sep 16, 2018

convert in.png -background '#000000' -alpha remove -alpha off PNG24:in.flat.png
convert in.png matte:- | convert - -negate PNG24:in.mask.png
(process)
convert out.flat.png out.mask.png -alpha Off -compose CopyOpacity -composite out.png

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

No branches or pull requests

3 participants