Page 1 of 1

Not able to convert AI to PNG with transparent background with original image quality

Posted: 2015-12-14T21:35:17-07:00
by 9_ahmad
Hi Every One,

Please help me out to convert AI to file to PNG with original image quality, I checked many blog in that few can convert transparent background but it also down image quality.

So please help me…  :(

Re: Not able to convert AI to PNG with transparent background with original image quality

Posted: 2015-12-15T00:57:30-07:00
by fmw42
Please do not post the same question to multiple forums.

You are not helping with such little information.

What IM version and platform? Post your results from

Code: Select all

convert -version
Post your AI file to some place such as dropbox.com and put the URL here.

Please read viewtopic.php?f=1&t=9620

Re: Not able to convert AI to PNG with transparent background with original image quality

Posted: 2015-12-15T03:36:19-07:00
by 9_ahmad
IM version - 6.8.6
platform - windows

file link : https://www.dropbox.com/s/c1n2ndv1uju5j ... AI.ai?dl=0


i got following script when used - verbose command
  • [ghostscript library] Files/gs/gs9.18/bin/gswin64c.exe" -q -dQUIET -dSAFER -dBAT
    CH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-
    sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFi
    le=D:/Users/afsarahmad.k/AppData/Local/Temp/magick-8412oxFrqg1onLcj%d" "-fD:/Use
    rs/afsarahmad.k/AppData/Local/Temp/magick-8412L7oxM3hfQxvW" "-fD:/Users/afsarahm
    ad.k/AppData/Local/Temp/magick-8412bVVs1Dru0cq3"D:/Users/afsarahmad.k/AppData/Lo
    cal/Temp/magick-8412oxFrqg1onLcj1 PNG 595x842 595x842+0+0 8-bit sRGB 46.7KB 0.01
    6u 0:00.019

Re: Not able to convert AI to PNG with transparent background with original image quality

Posted: 2015-12-15T04:57:34-07:00
by magick
Try this command:
  • convert -colorspace sRGB TEST\ AI.ai test.png

Re: Not able to convert AI to PNG with transparent background with original image quality

Posted: 2015-12-15T10:59:24-07:00
by fmw42
I renamed your file to TEST_AI.png to avoid the space in the filename and the following works fine for me on IM 6.9.2.8 Q16 Mac OSX with Ghostscript 9.10

Code: Select all

convert -colorspace sRGB TEST_AI.ai TEST_AI.png

What is your version of Ghostscript?

gs --version


This also works by quoting the filename.

Code: Select all

convert -colorspace sRGB "TEST AI.ai" "TEST AI.png"

Note your file is CMYK and should be converted to sRGB as above or with profiles, since PNG does not support CMYK

Re: Not able to convert AI to PNG with transparent background with original image quality

Posted: 2015-12-15T23:08:54-07:00
by 9_ahmad
thanks it work for me :-)
should i use same for PSD file?

Re: Not able to convert AI to PNG with transparent background with original image quality

Posted: 2015-12-16T00:32:07-07:00
by fmw42
Yes, if the PSD file is CMYK, then use the same -colorspace sRGB before reading in the PSD file.

Re: Not able to convert AI to PNG with transparent background with original image quality

Posted: 2015-12-16T00:33:14-07:00
by 9_ahmad
THANKS :-)

Re: Not able to convert AI to PNG with transparent background with original image quality

Posted: 2015-12-16T00:34:45-07:00
by fmw42
Actually if the ai or pdf file is already sRGB, it should not hurt to add colorspace sRGB before reading in the file. Same for any vector format file.