Page 1 of 1
how to convert .ai image to .jpg
Posted: 2009-07-22T21:44:29-07:00
by petercoloney
hi,
i was able to convert the images from .ai to .jpg individually, but dynamically through forms i was able to convert first image but the second image also contains the contains of the first image when i try to upload the image for the second time.
help me out..... what am i doing wrong?
Re: how to convert .ai image to .jpg
Posted: 2009-07-22T22:24:22-07:00
by anthony
More than likely it is your 'environment' in the forms.
It is a different environment, with different environment variables. PATH, LD_LIBRAY_PATH, HOME, etc etc etc.
This is not strictly an ImageMagick problem, but a usage from the forms environment problem.
try running and viewing the output of command like
and seeing ho they differ. Also watch permissions, especially if the 'id' or currnet user name' is different!
none of this is to do specifically with ImageMagick itself!
Re: how to convert .ai image to .jpg
Posted: 2009-07-23T00:33:32-07:00
by anthony
ai images are simple a special case of postscript.
Your need ghostscript installed and working for IM to convert it.
If you have it working on command line but not on the web, though you have an environment problem. Directory not writable, PATH not correct, etc etc etc.
Check the output of
and see if it hardcoded the path to 'gs', other wise it is using the PATH for the environment Im is called from.
Re: how to convert .ai image to .jpg
Posted: 2009-07-24T05:06:05-07:00
by petercoloney
hi anthony,
i have a list of .ai file but strangely i was able to convert only one image from the command prompt to .jpg image, so i dont think their is problem with gs.
but when im trying to convert the other images i failing to convert to .jpg format.
i have installed
ImageMagick-6.5.4-3-Q16-windows-dll.exe
and gs864w32.exe on my windows system.
when im trying to convert other images it gives the following message:
GPL Ghostscript 8.64: Unrecoverable error, exit code 1
convert: Postscript delegate failed
so whats the problem?
waiting for your reply.
Re: how to convert .ai image to .jpg
Posted: 2009-07-27T18:59:57-07:00
by anthony
It really seems like a ghostscript problem
try runing "gs" without IM
It is very raw way of doing things but it is a starting point.
Re: how to convert .ai image to .jpg
Posted: 2009-08-03T21:44:54-07:00
by petercoloney
hi anthony,
when i execute the gs image.ai i get error message as not recognisable internal or external command.
when i give the image path i get error message as no such file or directory @ps.c/ReadPSImage/744
so what the problem now.....
waiting for your reply........
Re: how to convert .ai image to .jpg
Posted: 2009-08-04T19:53:13-07:00
by anthony
Either you gs is not installed correctly, which is your problem all along.
Or your .ai image is not correct postscript (it should be).
Re: how to convert .ai image to .jpg
Posted: 2009-08-06T02:16:33-07:00
by petercoloney
hi anthony,
i got the solution. its seems a problem with the mode in which the .ai image is saved.
can you tell me how to find the resolution for png and jpg using im php code.
thanks for the reply.
Re: how to convert .ai image to .jpg
Posted: 2009-08-06T07:47:52-07:00
by Heiler81
If done the convert without any problems in the 6.5.4 with win and unix. If GS (8.64) works it can be done.
convert test.ai test.jpg
(Windows XP and Unix Solaris 10 tested)
Re: how to convert .ai image to .jpg
Posted: 2009-08-06T21:14:48-07:00
by anthony
petercoloney wrote:can you tell me how to find the resolution for png and jpg using im php code.
Postscript being a vector format does not encode a default density or resolution.
IM defaults to 72 dpi for images unless a -density setting is given before reading.
The only time resolution becomes an issue is when you are generating the raster image for a specific device (screen, printer, PDF, photo-printer), OR the postscript has a raster image (such as a photo) embedded in it.
I have not found any solution to determining the 'ideal' density needed for extacting the embedded photo perfectly. I have not even found a program to extract the raw image data (the raster data) directly from postscript files, though that should be posible!
If you do find a solution, or anyone can help, please let me and everyone else on the forum know!