PNG in Artefact

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

PNG in Artefact

Olivier Auverlot
I improved Artefact this morning and added the support for PNG files. It's now possible to use PDFPngElement to include a PNG (untransparent) in a PDF file produced by Artefact.


Best regards
Olivier ;-)
Reply | Threaded
Open this post in threaded view
|

Re: PNG in Artefact

abergel
Excellent!

Alexandre


> On Jan 11, 2015, at 10:43 AM, olivier auverlot <[hidden email]> wrote:
>
> I improved Artefact this morning and added the support for PNG files. It's now possible to use PDFPngElement to include a PNG (untransparent) in a PDF file produced by Artefact.
>
> https://sites.google.com/site/artefactpdf/
>
> Best regards
> Olivier ;-)

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply | Threaded
Open this post in threaded view
|

Re: PNG in Artefact

Torsten Bergmann
> > I improved Artefact this morning and added the support for PNG files. It's now possible to use PDFPngElement to include a PNG (untransparent) in a PDF file produced by Artefact.

Nice, what is the reason only untransparent PNGs work?

Thx
T.


Reply | Threaded
Open this post in threaded view
|

Re: PNG in Artefact

stepharo
JPEG supports is degrading. Less and less good support.

Le 11/1/15 18:04, Torsten Bergmann a écrit :
>>> I improved Artefact this morning and added the support for PNG files. It's now possible to use PDFPngElement to include a PNG (untransparent) in a PDF file produced by Artefact.
> Nice, what is the reason only untransparent PNGs work?
>
> Thx
> T.
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: PNG in Artefact

Torsten Bergmann
> JPEG supports is degrading. Less and less good support.
>
> Le 11/1/15 18:04, Torsten Bergmann a écrit :
> >>> I improved Artefact this morning and added the support for PNG files. It's now possible to use PDFPngElement to include a PNG (untransparent) in a PDF file produced by Artefact.
> > Nice, what is the reason only untransparent PNGs work?

Thanks - but that was not my question. PNG graphics format can - but must not
include transparency. When I understand the mail correct only non-transparent
PNG images are supported with the new addition.

That's why I ask about transparent PNG.

Bye
T.

Reply | Threaded
Open this post in threaded view
|

Re: PNG in Artefact

Olivier Auverlot
In fact, the PNG is converted to JPEG image before to be included in the PDF file. But the conversion process doesn't support transparency and sets a black background. I think that is a limitation in the JPEG writer but someone have perhaps an idea to fix it.

Olivier ;-)

2015-01-11 21:11 GMT+01:00 Torsten Bergmann <[hidden email]>:
> JPEG supports is degrading. Less and less good support.
>
> Le 11/1/15 18:04, Torsten Bergmann a écrit :
> >>> I improved Artefact this morning and added the support for PNG files. It's now possible to use PDFPngElement to include a PNG (untransparent) in a PDF file produced by Artefact.
> > Nice, what is the reason only untransparent PNGs work?

Thanks - but that was not my question. PNG graphics format can - but must not
include transparency. When I understand the mail correct only non-transparent
PNG images are supported with the new addition.

That's why I ask about transparent PNG.

Bye
T.


Reply | Threaded
Open this post in threaded view
|

Re: PNG in Artefact

stepharo
olivier
the problem with transparency is that it often depends on the printer driver (no joke) I once asked the people from omingraffle
and they told me that there is no standard.

Stef
Le 11/1/15 21:23, olivier auverlot a écrit :
In fact, the PNG is converted to JPEG image before to be included in the PDF file. But the conversion process doesn't support transparency and sets a black background. I think that is a limitation in the JPEG writer but someone have perhaps an idea to fix it.

Olivier ;-)

2015-01-11 21:11 GMT+01:00 Torsten Bergmann <[hidden email]>:
> JPEG supports is degrading. Less and less good support.
>
> Le 11/1/15 18:04, Torsten Bergmann a écrit :
> >>> I improved Artefact this morning and added the support for PNG files. It's now possible to use PDFPngElement to include a PNG (untransparent) in a PDF file produced by Artefact.
> > Nice, what is the reason only untransparent PNGs work?

Thanks - but that was not my question. PNG graphics format can - but must not
include transparency. When I understand the mail correct only non-transparent
PNG images are supported with the new addition.

That's why I ask about transparent PNG.

Bye
T.



Reply | Threaded
Open this post in threaded view
|

Re: PNG in Artefact

Stephan Eggermont-3
In reply to this post by Olivier Auverlot
Olivier wrote:
>In fact, the PNG is converted to JPEG image before to be included in the PDF file.
>But the conversion process doesn't support transparency and sets a black background.

Jpeg doesn't have transparency. For browsers there is a hack.
http://jim.studt.net/jpeg-alpha/
http://stackoverflow.com/questions/14220221/how-to-insert-transparent-png-in-pdf?rq=1

PDF supports transparency since PDF 1.4

To avoid trouble, only use images with the same color space and either a
1 bit mask or a clipping path. Composing images in different color spaces
with an alpha channel seems to be difficult to get right.

Stephan
Reply | Threaded
Open this post in threaded view
|

Re: PNG in Artefact

Levente Uzonyi-2
There's no need to convert a PNG to JPG at all. PNG's compression
algorithm is supported via the Flate filter. The only problem with it is
that it's just the IDAT section of the PNG file. But the rest can be
embedded too:
https://stackoverflow.com/questions/14220221/how-to-insert-transparent-png-in-pdf#answer-20001230
Btw transparency is not allowed in PDF/A-1.

Levente

On Mon, 12 Jan 2015, Stephan Eggermont wrote:

> Olivier wrote:
>> In fact, the PNG is converted to JPEG image before to be included in the PDF file.
>> But the conversion process doesn't support transparency and sets a black background.
>
> Jpeg doesn't have transparency. For browsers there is a hack.
> http://jim.studt.net/jpeg-alpha/
> http://stackoverflow.com/questions/14220221/how-to-insert-transparent-png-in-pdf?rq=1
>
> PDF supports transparency since PDF 1.4
>
> To avoid trouble, only use images with the same color space and either a
> 1 bit mask or a clipping path. Composing images in different color spaces
> with an alpha channel seems to be difficult to get right.
>
> Stephan
>