You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I use your library and thanks for all the great work
This "issue" is more of a question than anything else.
I am trying to add a caption onto an image but I think I am failing to understand how to use the custom method or if it even is supported?
This is what I have come up with when trying to add a caption via the convert command in imagemagick:
open(image_path)
|> custom("convert", "-background '#0008' -fill white -gravity center -size 50x30 caption:my caption")
|> save(path: image_path)
Is it possible somehow or is it not yet supported?
Thanks in advance
The text was updated successfully, but these errors were encountered:
I'm not an owner/maintainer here but I don't believe that is supported yet. label and caption and annotate which are all ways to get text on an image require special command processing.
mogrify -label "the caption" -gravity center -size 100x100 -fill red -write out.jpg inputfile.jpg
The problem here is that -label "the caption" is the wrong format for building labels. The command really needs a command that includes label:'the label' and it can't go wherever - it has to be in the right place within the command (after all the options i think). Additionally, when you use ImageMagick to create a label or caption, it is really just generating an image with that label. To get it on top of another image you need to combine them with composite.
I think to get the support out of this library, it probably needs a couple of custom command helpers that could deal with label and composite and putting the whole thing together. If you check out the code, there is a custom method to generate a histogram which is also a command in ImageMagick that needs some custom argument construction. That might be an example of how that functionality could be added to the library.
These links (ImageMagick docs and a SO post) should give some context:
(ImageMagick docs on label)[https://legacy.imagemagick.org/Usage/text/#label]
(SO Post: imagemagick place caption on existing image)[
https://stackoverflow.com/questions/36701114/imagemagick-place-caption-on-existing-image]
Hello, I use your library and thanks for all the great work
This "issue" is more of a question than anything else.
I am trying to add a caption onto an image but I think I am failing to understand how to use the custom method or if it even is supported?
This is what I have come up with when trying to add a caption via the convert command in imagemagick:
Is it possible somehow or is it not yet supported?
Thanks in advance
The text was updated successfully, but these errors were encountered: