Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Ilya Vassilevsky
@vassilevsky
Cool!
Raymond Gan
@rayning0
Can someone help me? I can't install RMagick 2.14.0. "Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information." However, mkmf.log says exactly the same sentence. How do I fix this?
Ilya Vassilevsky
@vassilevsky
Hi :) Do you have ImageMagick's development package installed? Try sudo apt-get install libmagickwand-dev on Ubuntu or sudo yum install ImageMagick-devel on Red Hat / CentOS.
Ilya Vassilevsky
@vassilevsky
Thanks for the info. I will add this to README.
Ilya Vassilevsky
@vassilevsky
gemhome/rmagick@e6bc1df correct?
Raymond Gan
@rayning0

Yes, but to be safe, I'd follow the same order as in the StackOverflow comment:
brew uninstall pkg-config
brew install pkg-config
brew unlink pkg-config && brew link pkg-config

Also, the key error message is pkg-config: command not found

Ilya Vassilevsky
@vassilevsky
why not
updated
Ilya Vassilevsky
@vassilevsky
How's the takeover going? @wurde have you heard from GitHub? @bf4 have you heard from Moncef?
Mikael Muszynski
@linduxed
Damn it, these red builds are starting to become a problem
I don't remember the last time we had a PR with a green build.
Although that might have to do more with me not inspecting every PR.
Ilya Vassilevsky
@vassilevsky
Agreed. It's mostly newer versions of ImageMagick. They broke some stuff it seems.
jaegerbombb
@jaegerbombb
hi guys is there a simple set up guide for rmagick on rails (for a beginner)
Tom von Schwerdtner
@tvon
Specific question. Is anyone familiar with ImageList core dumps when using rmagick on RHEL 6.5 with ImageMagick 6.7.2.7 and GraphicsMagick installed?
Maybe I can come up with a travis config to reproduce
This message was deleted
Jany
@mymai91
Hi, I trying using Rmagick.
I create image avatar default with Rmagick.
When I finishing create avatar default. I don't know the way to save it into database.
Currently, I use carrierwave to upload
This is my code
def draw_image(user_name)
    img = Magick::Image.new(96, 96){self.background_color = 'white'}
    name = user_name.split(" ")
    name = name[0][0] + name[-1][0]
    txt = Draw.new
    # img.annotate(img, width, height, x, y, text)
    img.annotate(txt, 0, 0, 0, 35, name){
      txt.gravity = Magick::SouthGravity
      txt.pointsize = 26
      txt.fill = '#3D3D3D'
      txt.font_weight = Magick::BoldWeight
    }
    img.format = 'jpeg'
    send_data img.to_blob, :stream => 'false', :filename => 'avatar-default.jpg', :type => 'image/jpeg', :disposition => 'inline'
  end
def create
    user_name = _user_params[:name]
    draw_image(user_name)
    if _user_params[:avatar].to_s.empty?
      _user_params[:avatar] = draw_image(user_name)
    end
    user = User.create!(_user_params)
    render json: {status: user}, root: false
  end
Jany
@mymai91
@/all : are you there?
Victor Justo V.
@vjustov
Hello
Victor Justo V.
@vjustov
I am using rmagick to convert the pages from a pdf to png, for that im calling to_blob, this returns a huge blob string, that somehow errors out while trying to pass it as an argument to a sidekiq worker. Im getting Encoding::UndefinedConversionError: "\x89" from ASCII-8BIT to UTF-8
Tom von Schwerdtner
@tvon
I forgot I was even in this room...
@vjustov You’re passing the blob to sidekiq?
Victor Justo V.
@vjustov
yes, in order to upload it to s3 on a different worker.
when sidekiq is trying to serialize the parameters to json, it errors out with said message
Tom von Schwerdtner
@tvon
I am not a redis expert but I’d be leery of shoving a bunch of data into the queue, would it be possible to write to a short-term file and to pass the file path to the next job?
I mean, I trust redis. But if you can just cache that data on the filesystem that seems more reliable than putting it into the queue.
(Apologies for totally sidestepping your question)
You could also jeck the sidekiq gitter room, though it is infrequently used. It seems like something is trying to convert your blob for whatever reason. Possibly for storage in redis...
Victor Justo V.
@vjustov
hmm, im gonna go and do that, meanwhile is the encoding of the blob really ascii-8?
Tom von Schwerdtner
@tvon
I don’t know, it seems like it might be more about what sidekiq expects than what rmagick produces.
Victor Justo V.
@vjustov
hmm interesting
now im doing this: t = Tempfile.new('pdf.page.image').write(blob) and i get the same error
Tom von Schwerdtner
@tvon
Are you passing the temp file or the path?
Also, a temp file lives with its process, it may not be around when the other job kicks off.
Victor Justo V.
@vjustov
i was passing the path, but what i meant was that i was also getting the error when calling #write with the blob, no sidekiq involved there.
i am trying to isolate and reproduce the behavior.
Tom von Schwerdtner
@tvon
ahh, gotcha
Ryan Hass
@rhass
I am trying to just display an image, but when I do nothing actually is displayed. Instead I get this: pry(main)> i = Magick::Image.from_blob(IO.read('/tmp/test.jpg')) ; pid = fork { i.display } ; Process.detach(pid) [ JPEG 2000x1050 2000x1050+0+0 DirectClass 8-bit 266kb]=> #<Thread:0x00000001b18450 sleep>
Any ideas why the image doesn't actually get displayed?
Ryan Hass
@rhass
Process.waitpid does essentially the same thing as well
[ JPEG 2000x1050 2000x1050+0+0 DirectClass 8-bit 266kb]=> 734
Trung Lê
@joneslee85
i think you should ask on StackOverflow, the chat room is pretty dormant atm
Alexandre ZANNI
@noraj1337
I have a big array [ [1, 1, 1], [1, 1, 1], [1, 1, 1] ... ] that are RGB pixels and I want to convert it to an image. Is it possible with Rmagick ?
Mischa Molhoek
@mmolhoek
Hi there everyone
@noraj1337 , it think your would have to use the array pack command in some way for that
Ramesh Choudhary
@ramesh-choudhary
Need your support guys