I am programming in Angular 8 with open layer (in package.json ol is version ^5.3.6).
When I create a new style for an image, I do something like:
const myIcon = new Style({
image:new Icon({
anchor:[0,0],
anchorOrigin: IconOrigin.BOTTOM_LEFT,
anchorXUnits:IconAnchorUnits.PIXELS,
anchorYUnits: IconAnchorUnits.PIXELS,
color: rgb(128,128,128),
src: 'myimage.svg'
})
});
The color need to be grey. When the image is on a dark (black or grey image), the image is barely seen.
So, I want to draw a contour arround the image, with white color (How can I compute a good negative contour, because the negative of 128 is 128).
The image is any image, such a flower. It is a transparent image with border as the shape of the flower, so I need to draw a non-rectangle contour.
Also the image is an Icon object, based on a svg image
Is there another good solution, except drawing contour arround the image?
How can I add a contour arround the image?