Hi !
I'm trying to convert SVG file to JPG.
the SVG includes two images one comes from a remote URL and the other photo is under my server - when the final result should be one photo(JPG) combined with the two photos in the SVG.
When i'm running the command -
exec("convert -density 100 http://remoteurl.com/blabla.svg -compress none -depth 16 blabla.jpg);
The output is that i see only the photo the one from my local server.
but if i run this command(when both of the files under the my server) -
exec("convert -density 100 blabla.svg -compress none -depth 16 blabla.jpg);
It works great !
What might be the problem ?
Problem with converting image from remote url
Re: Problem with converting image from remote url
It might be a server/php problem either not allowed to "hotlink" or the local server will not download files from another server?
Have you tried displaing a file from the other server just using the <img> tags?
Have you tried displaing a file from the other server just using the <img> tags?
Re: Problem with converting image from remote url
[UPDATE]Bonzo wrote:It might be a server/php problem either not allowed to "hotlink" or the local server will not download files from another server?
Have you tried displaing a file from the other server just using the <img> tags?
I've updated IM to the last version, and now i can get the remote image BUT after the conversion i can see the combined JPG with both images but ONLY the remote image looks blurry and messi.
Any ideas ?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Problem with converting image from remote url
What SVG conversion do you use..
See IM and SVG handling
http://www.imagemagick.org/Usage/draw/#svg
Also you may like to super-sample the rasterization.
That us use say -density 400, read the SVG, then use -scale 25%
This is often used fro vector to raster image conversion, such as in these examples for postscript
http://www.imagemagick.org/Usage/text/#postscript
HOWEVER, SVG typically does not need this.
NOTE: scale is used to 'bin' 16 pixels into one pixel. At other scaling factors you would use -resize.
See Resize and Scaling, Scale Operator
http://www.imagemagick.org/Usage/resize/resize/#scale
See IM and SVG handling
http://www.imagemagick.org/Usage/draw/#svg
Also you may like to super-sample the rasterization.
That us use say -density 400, read the SVG, then use -scale 25%
This is often used fro vector to raster image conversion, such as in these examples for postscript
http://www.imagemagick.org/Usage/text/#postscript
HOWEVER, SVG typically does not need this.
NOTE: scale is used to 'bin' 16 pixels into one pixel. At other scaling factors you would use -resize.
See Resize and Scaling, Scale Operator
http://www.imagemagick.org/Usage/resize/resize/#scale
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Problem with converting image from remote url
Also not that when using http://.... IM is really just reading the image from a "wget" like operation.
You can always do the download using "wget", "curl" or some other web utility.
You can always do the download using "wget", "curl" or some other web utility.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/