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

RGBA masks without transparency #80

Closed
cweiske opened this issue Jul 10, 2021 · 2 comments
Closed

RGBA masks without transparency #80

cweiske opened this issue Jul 10, 2021 · 2 comments

Comments

@cweiske
Copy link
Contributor

cweiske commented Jul 10, 2021

Some passepartout masks .svgs (like 46366, group "Kinder") do not have transparency, but white areas that are meant to be transparent when overlaid over the photo.

These are converted by cairosvg to RGBA images, whatever the reason. cewe2pdf thus assumes they have transparency, and only uses the alpha channel for masking. This makes it appear as if the mask was not applied at all.

@cweiske
Copy link
Contributor Author

cweiske commented Jul 10, 2021

To support both modes in RGBA files, we need to convert the transparency to white, and use the RGB handling then.

@cweiske
Copy link
Contributor Author

cweiske commented Jul 10, 2021

This is also fixed in PR #79

@bash0 bash0 closed this as completed in fc2d605 Jul 13, 2021
AnEnglishmanInNorway added a commit to AnEnglishmanInNorway/cewe2pdf that referenced this issue Jul 21, 2021
* Update build_a_compiled_version.md

Added a note reminding people to have their cewe2pdf.ini and additional_fonts.txt files together with the mcf file when testing.

* Try to load downloaded clipart files

Resolves: bash0#76

* Allow XML entites in .svg files

Some masks use them:
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
        <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
        <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
        <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
        <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"

* Support masks/passepartouts without clipart and foto area

Resolves: bash0#78

* Load downloaded masks/passepartouts from ~/.mcf folder

* Load downloaded backgrounds from ~/.mcf

* Support mask files with multiple mask definitions

.. like Resources/photofun/decorations/masks_default.xml

* Print mask file instead of clipart file

.. because we do not always have a clipart file in a passepartout

* Support RGBA svg masks with white instead of real transparency

To support RGBA svg files with both alpha and white as transparency indicator,
we convert the alpha channel to white and use standard RGB handling afterwards.

Resolves: bash0#80

* Add "--pages" command line option to render specific pages only.

Resolves: bash0#83

* Add "--pages" command line option to render specific pages only.

Resolves: bash0#83

* Add "--pages" command line option to render specific pages only.

Resolves: bash0#83

* Update .gitignore for a couple of local files (test pdf plus some trial work on Inno Setup)

Co-authored-by: Christian Weiske <cweiske@cweiske.de>
Co-authored-by: bash0 <bash0@users.noreply.github.com>
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

1 participant