<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>> As far as i remember i implemented an overprint option in pdftoppm for this</span> purpose. You can see the difference if you run the ghent test suite with<span> and without this switch.</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
SPLASH_CMYK affects more than overprint. It also matters in pdftops -level1sep with some PDFs that have features like transparencies that aren't supported in level 1 PS and require rasterizing with splash.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I can send example PDFs through email or in a poppler issue if anyone wants to see what happens.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>> But sizeof(SplashColor) == 8 instead of 4, then allocating </span>SplashColor[size] will consume twice the memory even if we only use the <span>first half of entry, will it not?</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>I forgot about that. I have found bugs due to code that didn't count SPOT_NCOMPS like <a href="https://bugs.freedesktop.org/show_bug.cgi?id=90570" id="LPlnk542125">https://bugs.freedesktop.org/show_bug.cgi?id=90570</a></span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>If all of the poppler users that need SPLASH_CMYK usually build poppler from source, could you compromise by keeping SPLASH_CMYK turned off by default but enabling it on CI builds?</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Is there any way to handle it at run-time using C++ features? Would templates work or would they increase the code size too much?</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Regards,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
William</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> poppler <poppler-bounces@lists.freedesktop.org> on behalf of Adam Reichold <adam.reichold@t-online.de><br>
<b>Sent:</b> Thursday, April 25, 2019 10:08 AM<br>
<b>To:</b> poppler@lists.freedesktop.org<br>
<b>Subject:</b> Re: [poppler] Fwd: splashModeDeviceN8 in two switch</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Hello again,<br>
<br>
Am 25.04.19 um 07:44 schrieb Thomas Freitag:<br>
> Sorry, i wanted to send it to the list, too<br>
> <br>
> ---------- Forwarded message ---------<br>
> Von:Thomas Freitag <thomas.freitag.bbr@gmail.com><br>
> Date: Do., 25. Apr. 2019, 07:42<br>
> Subject: Re: [poppler] splashModeDeviceN8 in two switch<br>
> To: Albert Astals Cid <aacid@kde.org><br>
> <br>
> <br>
> Your argument is wrong, Albert.<br>
> Even if we remove the compiler directive, "noone" will use this mode by<br>
> default, because the default rendering is RGB. So you don't need more<br>
> memory for rendering and it doesn't become slower. Just the code need more<br>
> memory.<br>
<br>
But sizeof(SplashColor) == 8 instead of 4, then allocating<br>
SplashColor[size] will consume twice the memory even if we only use the<br>
first half of entry, will it not?<br>
<br>
Best regards,<br>
Adam<br>
<br>
> But the "professionell" user would have the ability to simulate overprint.<br>
> As far as i remember i implemented an overprint option in pdftoppm for this<br>
> purpose. You can see the difference if you run the ghent test suite with<br>
> and without this switch.<br>
> <br>
> Cheers,<br>
> Thomas<br>
> <br>
> PS: Not only William uses it, i do it too<br>
> <br>
> Albert Astals Cid <aacid@kde.org> schrieb am Mi., 24. Apr. 2019, 19:40:<br>
> <br>
>> El dimarts, 23 d’abril de 2019, a les 18:11:04 CEST, Adam Reichold va<br>
>> escriure:<br>
>>> Hello,<br>
>>><br>
>>> thinking about this again with a bit of distance, should we maybe remove<br>
>>> the `SPLASH_CMYK` preprocessor flag entirely? I am assuming the reasons<br>
>>> for having this upstream is to keep the code from bit rotting as<br>
>>> Poppler's internals change? If nobody builds this, then this will not<br>
>>> happen. (CI checks improve things, but it will still be "late" feedback<br>
>>> instead of being part of the initial edit-compile-test cycle. Also, this<br>
>>> will not reach e.g. clusterfuzz which thereby will not verify that code.)<br>
>>><br>
>>> Are there any downsides to removing the conditional compilation? Does<br>
>>> this break code that does not request the CMYK handling explicitly? If<br>
>>> so, could we fix this via the internal API instead of hard-coded it at<br>
>>> compile time?<br>
>><br>
>> The main problem i see is that it makes SplashColor for from 4 bytes to 8<br>
>> bytes, so may make things slower/use more memory for a feature "noone uses".<br>
>><br>
>> Cheers,<br>
>> Albert<br>
>><br>
>> P.S: Of course the "noone uses" is a bit of a self fulfilling prophecy if<br>
>> we don't enable it<br>
>><br>
>>><br>
>>> Best regards,<br>
>>> Adam<br>
>>><br>
>>> Am 22.04.19 um 13:14 schrieb Albert Astals Cid:<br>
>>>> This is mostly for William since AFAIK he's the "only" one using<br>
>> SPLASH_CMYK.<br>
>>>><br>
>>>> I've tried to enable SPLASH_CMYK on the CI and it's loudly complaining<br>
>> that the splashModeDeviceN8 cases are missing in SplashOutputDev.cc<br>
>>>><br>
>>>> <a href="https://gitlab.freedesktop.org/aacid/poppler/-/jobs/253647">https://gitlab.freedesktop.org/aacid/poppler/-/jobs/253647</a><br>
>>>><br>
>>>> Any suggestion of what the code should be?<br>
>>>><br>
>>>> Should they just be the same as case splashModeCMYK8: ? The first one<br>
>> looks like it may make sense, but not so sure about the second.<br>
>>>><br>
>>>> Cheers,<br>
>>>> Albert<br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> poppler mailing list<br>
>>>> poppler@lists.freedesktop.org<br>
>>>> <a href="https://lists.freedesktop.org/mailman/listinfo/poppler">https://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
>>>><br>
>>><br>
>>><br>
>><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> poppler mailing list<br>
>> poppler@lists.freedesktop.org<br>
>> <a href="https://lists.freedesktop.org/mailman/listinfo/poppler">https://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
> <br>
> <br>
> _______________________________________________<br>
> poppler mailing list<br>
> poppler@lists.freedesktop.org<br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/poppler">https://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
> <br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>