A
A
Andrey Frolov2017-05-09 03:32:54
PHP
Andrey Frolov, 2017-05-09 03:32:54

How to round the corners of a square image in php and overlay it on a new image?

How to round the corners of a square image in php and overlay it on a new image?
Ideally, it would be cool to put a frame on the edges, but at least complete the first part.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Sisyukin, 2017-05-09
@Caarl

Everything you need is here, php.net/manual/en/book.imagick.php

A
Alex Teterin, 2017-05-09
@errogaht

Such things are done in CSS, doing it in PHP is too resource intensive. And you don't know where your image will be shown, for each place on the site, asking PHP to make its own version of the image is not the best solution.
If you still want to do it in PHP, then of course you don’t need to use PHP functions directly to work with pictures, since it takes a long time and the code will be difficult to read. Here is a great library for this
image.intervention.io or https://github.com/thephpleague/glide

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question