C
C
Castiel2015-03-26 15:12:52
ruby
Castiel, 2015-03-26 15:12:52

RMagick and round the corners of a picture?

I tried all the examples that I found in Google, + I tried it through the extension ' https://github.com/sarcilav/magick_round_corners did everything according to the instructions, but in the end the original image is still saved, without rounded corners
, maybe someone has a ready-made code from the project, which one will definitely work?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zion5un, 2015-03-26
@zion5un

The github documentation says:

Friendly reminder
When saving/writing out your rounded images, use an extension that supports transparencies (aka this will not generate rounded jpg images)

We search Google for what formats are supported and find the answer:
PNG-24 supports different levels of transparency. Each pixel can have an opacity between 0 and 255 (so 0 is completely transparent).
GIF and PNG-8 both use color palettes, and support transparency only in the form ON or OFF (you select which color should be transparent).
JPG does not support transparency.

R
randsina, 2015-03-31
@randsina

I do not know your project, but I will assume such an option, which I usually use.
Screw bootstrap, add class img-circle or img-rounded to image, getbootstrap.com/css/#images. Allows you to display the finished image rounded

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question