Page 1 of 1
Converting PDF to TIFF lost transparent
Posted: 2016-12-08T03:50:18-07:00
by hout827
I convert a PDF to image by following commands,
Code: Select all
ImageMagick-7.0.1-Q16> convert C:\tog\test.pdf[0] -channel rgba -alpha on c:\tog\Test2.tiff
Code: Select all
ImageMagick-7.0.1-Q16> convert C:\tog\test.pdf[0] -channel rgba -alpha on PNG32:c:\tog\Test2.png
The
png image has a transparent backgound, but the
tiff image has a
white background.
I expect tiff has transparent background too.
Can any one give me some advice?
Thank you in advance!
Re: Converting PDF to TIFF lost transparent
Posted: 2016-12-08T05:19:21-07:00
by snibgo
What version of Ghostscript are you using? If older than 9.19, I suggest you upgrade it.
Try "-background none" before for the input pdf.
Re: Converting PDF to TIFF lost transparent
Posted: 2016-12-08T17:39:11-07:00
by hout827
Thanks for reply.
My Ghostscript is 9.19
And I tested again with '-background none', but the result is same, output tiff has white background still.
Code: Select all
ImageMagick-7.0.1-Q16>convert -background none c:\tog\Test.pdf -channel rgba -alpha on C:\tog\Test.tif
Re: Converting PDF to TIFF lost transparent
Posted: 2016-12-08T18:06:26-07:00
by fmw42
Post your PDF to some place such as dropbox.com so we can test with it and put the URL here.
Re: Converting PDF to TIFF lost transparent
Posted: 2016-12-08T18:21:33-07:00
by hout827
Re: Converting PDF to TIFF lost transparent
Posted: 2016-12-08T20:40:45-07:00
by fmw42
Both these commands produce transparent images on my IM 6.9.6.7 Q16 and IM 7.0.3-9 Q16 Mac OSX with
PNG* PNG rw- Portable Network Graphics (libpng 1.6.24)
TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 4.0.6)
Code: Select all
convert Test.pdf test.png
convert Test.pdf test.tif
Check your version of libtiff with
Re: Converting PDF to TIFF lost transparent
Posted: 2016-12-09T00:48:55-07:00
by hout827
ImageMagick-7.0.1-Q16 in Win10,
PNG* PNG rw- Portable Network Graphics (libpng 1.6.20)
TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 4.0.6)
Is it a bug of Imagemagick Windows version only?
Re: Converting PDF to TIFF lost transparent
Posted: 2016-12-09T06:17:56-07:00
by snibgo
v7.0.1 was the first of the v7 releases, and not entirely free of bugs, shall we say. I suggest you try a more recent version.
Re: Converting PDF to TIFF lost transparent
Posted: 2016-12-11T17:39:57-07:00
by hout827
Thanks for suggestion.
But tested in v7.0.3 (in win10), same issue.
tif has white background, and png's background is transparency.