<div dir="auto">This is more or less a guess, i can't look at the source code in the moment, but as far as i remember the sizeof(SplashColor) is just use to setup the paint color, the SplashBitmap has the number of bytes fitting to the splashMode. Or not? I will have a look, too, probably next week.<div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto">Thomas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Adam Reichold <<a href="mailto:adam.reichold@t-online.de">adam.reichold@t-online.de</a>> schrieb am Do., 25. Apr. 2019, 16:08:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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 <<a href="mailto:thomas.freitag.bbr@gmail.com" target="_blank" rel="noreferrer">thomas.freitag.bbr@gmail.com</a>><br>
> Date: Do., 25. Apr. 2019, 07:42<br>
> Subject: Re: [poppler] splashModeDeviceN8 in two switch<br>
> To: Albert Astals Cid <<a href="mailto:aacid@kde.org" target="_blank" rel="noreferrer">aacid@kde.org</a>><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 <<a href="mailto:aacid@kde.org" target="_blank" rel="noreferrer">aacid@kde.org</a>> 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" rel="noreferrer noreferrer" target="_blank">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>
>>>> <a href="mailto:poppler@lists.freedesktop.org" target="_blank" rel="noreferrer">poppler@lists.freedesktop.org</a><br>
>>>> <a href="https://lists.freedesktop.org/mailman/listinfo/poppler" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
>>>><br>
>>><br>
>>><br>
>><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> poppler mailing list<br>
>> <a href="mailto:poppler@lists.freedesktop.org" target="_blank" rel="noreferrer">poppler@lists.freedesktop.org</a><br>
>> <a href="https://lists.freedesktop.org/mailman/listinfo/poppler" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
> <br>
> <br>
> _______________________________________________<br>
> poppler mailing list<br>
> <a href="mailto:poppler@lists.freedesktop.org" target="_blank" rel="noreferrer">poppler@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/poppler" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
> <br>
<br>
_______________________________________________<br>
poppler mailing list<br>
<a href="mailto:poppler@lists.freedesktop.org" target="_blank" rel="noreferrer">poppler@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/poppler" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/poppler</a></blockquote></div>