Skip to content

RMagick ignoring border_color #1

bf4 opened this Issue Jul 24, 2014 · 3 comments

2 participants

rmagick member
bf4 commented Jul 24, 2014

Issue by rggjan
Tuesday Feb 23, 2010 at 13:50 GMT
Originally opened as #1

With this code:

require 'RMagick'
include Magick'/home/jan/Desktop/test.jpg')

collage = imagelist.montage do
  self.border_width=10, 500)


IMGCOMMAND="-border 10x10 -bordercolor red -geometry 500x500 /home/jan/Desktop/test_collage_original.jpg"
system "montage /home/jan/Desktop/test.jpg " + IMGCOMMAND

A red border is created with the original imagemagick (test_collage_original) while it is white with Rmagick (test_collage). It should be red in both cases...

rmagick member
bf4 commented Jul 24, 2014
rmagick member
bf4 commented Jul 24, 2014

Comment by linduxed
Saturday Nov 02, 2013 at 14:26 GMT

Confirmed to still be the case in the latest version of RMagick @mmaiza.


I was tracing sources to understand how self.border_color = 'red' works and noticed that the Color_to_PixelPacket function receives a pointer to montage->info->border_color, but if the color is specified as a string, it passes the pointer further to the Color_Name_to_PixelPacket function, but already as a value. My knowledge of C is quite vague, so I'm not sure if this is normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.