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

Colorize Image Effect changes the colour in generated document #217

Open
darinshepit opened this issue Sep 29, 2023 · 1 comment
Open

Colorize Image Effect changes the colour in generated document #217

darinshepit opened this issue Sep 29, 2023 · 1 comment

Comments

@darinshepit
Copy link

In my template I'm using a black icon and changing the colour to cyan using Image Effects > Colorize.

In the template, the XML line is:

<ImageEffect Code="2" Param="Cyan&#10;100"/>

When the document is generated, it changes it to, even dropping part of the code to a new line:

<ImageEffect Code="2" Param="Cyan
100"/>

In Scribus, it creates a new colour called Cyan 100, which is brown in the Colors and Fills window...

image

And sets the Shade to 0% in Image Effects > Colorize, so it looks white.

image

When I open the .SLA file in a text editor and Find and Replace the generated code with the template code, everything works. Otherwise, I have to go into each individual icon in Scribus and change them all back to the correct colour.

@berteh
Copy link
Owner

berteh commented Oct 30, 2023

hello @darinshepit, thanks for the feedback.

This is indeed a nasty bug, since &#10; means exactly that: it's the numeric character entity of a linefeed character in XML... and my SG script stupidely replaces this with its "real" meaning (a linefeed) that breaks the really stupid separator chosen by Scribus to distinguish multiple parameters of an effect.

I'll have to dig deep in the code and Python encoding/decoding mechanisms to find out where that replacement happens and how to prevent it... might take quite some time. I'm sorry.

If you find the time to look into it, I'd be happy to merge any fix, even ugly looking.

have a nice day !

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

No branches or pull requests

2 participants