Image Manipulation in laravel controller and storing it as base64 string in db
I am stuck with a problem in a flutter project where I need to display a image as google map marker. I can show base64encoded image there or even a normal image. Issue is that it needs to have a shape polygon with a border.
the solution to that was to either create a widget and use it, but this solution don't support the image output.
another solution is to store the image with border and polygon shape as base64encode string and use it directly.
1st solution is not progressing so looking forward to second solution.
my simple question is how to do this in laravel controller when a user uploads a image, either square or rectangle or something.
any suggestions or code that can be shape is appreciated :)
below image is the demo for expectation and current output:
For cropping an image to a hexagonal shape and adding borders to it you probably have to make yourself familiar with the Imagick library: https://github.com/Imagick/imagick