I'm reading a PDF file (adobe illustrator) and trying to save it as png
$img->read('logo.ai');
$img->write('logo.png');
The probleme is that I'm loosing all the transparency and semi-transparency
using instead:
$img->read('logo.ai');
$img->Transparent('color' => 'white');
$img->write('logo.png');
doesn't resolve the problem for the semi-transparency.
What are the correct PerlMagick (ver: 6.5.1.1) settings to use?
Sincerly
Transparency lost in PDF to PNG
Re: Transparency lost in PDF to PNG
Post a URL to logo.ai so we can reproduce the problem and suggest a solution.
Re: Transparency lost in PDF to PNG
PDF file: http://dl.free.fr/jr8MhtYWh
Expected PNG result: http://dl.free.fr/j0zgE6wSg
Rectangles present in files are:
* Top Left: gray with transparency
* Top right: gray
* Bottom Left: transparent
* Bottom Right: white
Expected PNG result: http://dl.free.fr/j0zgE6wSg
Rectangles present in files are:
* Top Left: gray with transparency
* Top right: gray
* Bottom Left: transparent
* Bottom Right: white
Re: Transparency lost in PDF to PNG
Try
- $img->Read('ai:logo.ai');
$img->write('logo.png');
Re: Transparency lost in PDF to PNG
Effectiveley, prefixing with ai: I've got some extra-transparency, but not for the whole background, as white is still present between rectangles (http://dl.free.fr/qb4aYerfa), but I guess this is also part of the pngalpha problem.
Thank you
Thank you