Hey everyone!
I am new to ImageMagick and trying to "compile" a map with a number of locations marked on it. I'd be really grateful if a Magick guru could offer some of their wisdom...
How I was going to do this was:
1. Have a base image, the map.
2. Have a marker image, to locate the city
3. Use the -compose parameter to over the marker on the map
Is this a good technique? What I am curious about it how to define the location of the marker as an EPS is a vector file.
What I had orginally thought was to make the canvas size of the EPS that the marker file sits on the same as the canvas size of the map EPS and then just overlay them.
But when I try this the marker and map position align themselves top left, dont relative to their canvases. Maybe I am being ignorant. By canvas I mean the canvas size I used in Illustrator.
I guess if I create a identical 'border' for each it will work. Right?
Thanks for any advice.
R
How do I plot "Locations" on an EPS map?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How do I plot "Locations" on an EPS map?
Really I think we will need an example to figure out just what you are wanting.
Normally however that EPS is encapsulated postscript. That is a vector image, or at least a raster image wrapped in a vector language. IM may not be the right tool. An example will let us determine if this is the case or not, and let us give you an idea on how best to proceed.
Normally however that EPS is encapsulated postscript. That is a vector image, or at least a raster image wrapped in a vector language. IM may not be the right tool. An example will let us determine if this is the case or not, and let us give you an idea on how best to proceed.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: How do I plot "Locations" on an EPS map?
Thanks for your kind reply.
I think I have this working... but I have two issues.
Basically I am combing two EPS files together. Imagine both have the same frame.
Image 1 = a map of Australia with a frame
Image 2 = a circle marking Brisbane's location and the frame [I've deleted the map of Australia]
++++ I've uploaded an example of the two EPS files here: http://www.drop.io/9y48bim ++++
Then if I combine the two images (ie, put image 2 on top of image 1) I will have a map with the marker.
Both images have transparent backgrounds and I've already positioned the marker in the right place relative to the frame which is common to both images (the registration frame if you like for alignment purposes).
I was using composite -compose mutiply map.eps marker.eps mapwmarker.eps
This works EXCEPT
1. The file has been rasterized
-- I want to keep it as a vector
2. The image has been reversed (the multiply flag has caused that no doubt).
Is there a way to:
a. Join to EPS files (as two layers) and output another EPS file? I need a vector not raster output
b. Literally overlay the marker to it doesnt multiply the output image.
ImageMagick is great and there looks like several ways to do this, but the documentation has me in knots.
Any help would be greatly recevied.
Many thanks
R
I think I have this working... but I have two issues.
Basically I am combing two EPS files together. Imagine both have the same frame.
Image 1 = a map of Australia with a frame
Image 2 = a circle marking Brisbane's location and the frame [I've deleted the map of Australia]
++++ I've uploaded an example of the two EPS files here: http://www.drop.io/9y48bim ++++
Then if I combine the two images (ie, put image 2 on top of image 1) I will have a map with the marker.
Both images have transparent backgrounds and I've already positioned the marker in the right place relative to the frame which is common to both images (the registration frame if you like for alignment purposes).
I was using composite -compose mutiply map.eps marker.eps mapwmarker.eps
This works EXCEPT
1. The file has been rasterized

2. The image has been reversed (the multiply flag has caused that no doubt).
Is there a way to:
a. Join to EPS files (as two layers) and output another EPS file? I need a vector not raster output
b. Literally overlay the marker to it doesnt multiply the output image.
ImageMagick is great and there looks like several ways to do this, but the documentation has me in knots.
Any help would be greatly recevied.
Many thanks
R
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How do I plot "Locations" on an EPS map?
I don't think IM is the tool for you. see http://www.imagemagick.org/Usage/formats/#vector
Re: How do I plot "Locations" on an EPS map?
Thanks! Ok, I am clear now. Now vector to vector transformations
that explains why I was getting a raster ouput
Now that is clear (sorry, I am new to IM) could someone suggest which is the right command to overlay an image with a transparent background directly on top of the another?
Thanks


Now that is clear (sorry, I am new to IM) could someone suggest which is the right command to overlay an image with a transparent background directly on top of the another?
Thanks
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How do I plot "Locations" on an EPS map?
convert backgroundimage overlayimage -compose overlay -composite resultimager2d2c3p0 wrote:Thanks! Ok, I am clear now. Now vector to vector transformationsthat explains why I was getting a raster ouput
![]()
Now that is clear (sorry, I am new to IM) could someone suggest which is the right command to overlay an image with a transparent background directly on top of the another?
Thanks
see http://www.imagemagick.org/Usage/compose/#compose and http://www.imagemagick.org/Usage/layers/
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How do I plot "Locations" on an EPS map?
This is off topic, as ImageMagick is a raster image processor, However.....r2d2c3p0 wrote:Thanks! Ok, I am clear now. Now vector to vector transformationsthat explains why I was getting a raster output
NOTE that EPS postscript is very specific. It should be very posible to combine BOTH eps vector images together to form a new EPS vector image without needing to do anything major. that is the point of EPS.
As the two EPS are the same size with the same bounding box conditiond (specified in the comment header of the EPS file format), you may be able to just strip the '%%' comment header from on file, then append that directly to the other file without modification!
Looking at the files...
Hmmm OKAY.. BOTH files has some binary garbage before the start of the EPS header line
%!PS-Adobe-3.1 EPSF-3.0
that should be stipped.
Bounding box is 0 0 645 339 in both.. good.
however it looks like the EPS files are not designed to play nice

Sorry....
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/