[luatex] luatex doesn't set /Smask in pdf 2.0
luigi scarso
luigi.scarso at gmail.com
Wed Jun 30 16:48:57 CEST 2021
On Wed, Jun 30, 2021 at 3:02 PM Ulrike Fischer <luatex at nililand.de> wrote:
>
> I lost transparency in a png used in a pdf 2.0 document.
>
> It looks as if luatex decides if to use a /Smask by looking only at
> the minor version. So 1.4-1.9 work, 2.0-2.3 fail, 2.4 works again
>
>
> \pdfvariable compresslevel=0
> \pdfvariable objcompresslevel=0
> \pdfvariable majorversion =2
> \pdfvariable minorversion =0 % or 4
> \saveimageresource {transparent.png}
> \useimageresource\lastsavedimageresourceindex
> xxx
> \bye
>
> Result
>
> minor 0:
> << /Type /XObject /Subtype /Image /Width 50 /Height 50
> /BitsPerComponent 8 /ColorSpace /DeviceRGB /Length 7500 >>
>
> minor 4:
> << /Type /XObject /Subtype /Image /Width 50 /Height 50
> /BitsPerComponent 8 /ColorSpace /DeviceRGB /SMask 7 0 R /Length 7500
> >>
>
> transparent.png is an arbitrary image with transparency.
>
yes, we assume majorversion=1
490 /*tex alpha channel support */
491 if (pdf->minor_version < 4
492 && png_get_color_type(png_p, info_p) |
PNG_COLOR_MASK_ALPHA) {
493 png_set_strip_alpha(png_p);
494 png_copy = false;
495 }
What are the rules for png when majorversion=2 ?
--
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20210630/a6f3dee3/attachment.html>
More information about the luatex
mailing list.