Transparency not handled #14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
By josch on 2015-03-15T09:41:51.076Z
Created by: ysangkok
The PDF produced like this:
is only viewable in acroread, and not with pdf.js or xpdf or evince or ImageMagick. I suspect it's a colorspace issue again.
Imported comments:
By josch on 2013-10-21 14:10:19 UTC
Well, you can't have transparent images in pdfs. The way transparency is achieved is by using a mask or key on an image without transparency. The masked parts will then be rendered transparently. But if you would try to convert the pdf back to images, then you would end up with an image without transparency and the mask. You would then have to combine those two to get the original image with transparency.
Img2pdf was written to allow storing images in a pdf container without any loss of quality. You could now argue that since there is a way to achieve transparency in pdf, it should allow to do the same for transparent images even if that means to do some conversion of the input image.
What is your use case? Would it be enough if the transparency would be replaced by a solid color? I'm afraid that extracting a working mask would be quite some effort...
By josch on 2017-01-21T07:53:11.083Z
Closing because submitter doesn't provide more detail about why transparency support would be useful.
By josch on 2017-01-21T07:53:11.374Z
Status changed to closed