我想使用imagemagick为照片添加水印.我正在使用OSX和Python脚本代码,并尝试从(http://www.imagemagick.org/Usage/text/#pango_markup)的代码目前我正在努力理解为什么我不能让图像出现.
serinitus:nppPhotos ns$ convert -background lightblue -gravity center -size 180x \
> pango:"The <b>bold</b> and <i>beautiful</i>" \
> pango_formatting.gif
convert: unable to open image `The <b>bold</b> and <i>beautiful</i>': No such file or directory @ error/blob.c/OpenBlob/2658.
convert: no decode delegate for this image format `PANGO' @ error/constitute.c/ReadImage/501.
convert: no images defined `pango_formatting.gif' @error/convert.c/ConvertImageCommand/3187.
serinitus:nppPhotos ns$
Run Code Online (Sandbox Code Playgroud)
安装的版本是ImageMagick 6.8.9-7 Q16 x86_64 2014-09-14和pango-1.36.7通过自制程序.
我尝试使用--with-pango标志重新安装ImageMagick.
我有两个选择之一:我在命令行中遗漏了一些非常明显的东西(甚至认为我已经复制/粘贴了它),或者有一个配置错误,就像brew在OSX Lion上安装imagemagick一样.
这个项目是对原版的重新启动,我正试图掌握各种宝石 - 除了我之外,轨道作曲家能够很好地理解所发生的事情.
我得到的这个Capybara错误与注册代码有关(我有几个使用该调用的规范,但是这里只包含其中一个,因为它们都调用了相同的帮助器).
Capybara::Ambiguous:
Ambiguous match, found 2 elements matching field "Password"
Run Code Online (Sandbox Code Playgroud)
我已经看过StackOverflow(好几次),并使用了Messr Google的力量 - 他主要建议我看看这里.
起初我认为这与做错了有关
fill_in 'Email', with: email
Run Code Online (Sandbox Code Playgroud)
和
fill_in 'Email', :with => email
Run Code Online (Sandbox Code Playgroud)
但似乎都没有区别.
通过阅读rubydoc.info capybara fill-in中的文档(我知道:惭愧),填充需要一个定位器和一个选项数组.
我的理解是fill_in 'Password', with: password匹配Password定位器,这是id="user_password"html 的一部分.我在页面上看不到任何其他人,所以我现在正在寻求帮助.
我的所有代码都在我的项目Github项目分支的SO001分支上,以匹配这个问题.
sign_up_spec.rb
feature 'Sign Up', :devise do
# Scenario: Visitor can sign up with valid email address and password
# Given I am not signed in
# When I sign up …Run Code Online (Sandbox Code Playgroud)