Reputation: 23
I am having issues with ImageMagick. I downloaded ImageMagick through Homebrew and for some reason the captcha appears blacked out.
This is what I am getting:
Here is the ImageMagick version I am using:
Hamels-MacBook-Air:gitreports HD$ magick -version
Version: ImageMagick 7.0.5-4 Q16 x86_64 2017-03-25 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib
Also this is what I am receiving in the console:
Started GET "/issue/hd719/Bloc-Jams" for ::1 at 2017-04-25 21:02:29 -0400
Processing by RepositoriesController#repository as HTML
Parameters: {"username"=>"hd719", "repositoryname"=>"Bloc-Jams"}
User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."username" = ? LIMIT 1 [["username", "hd719"]]
Repository Load (0.3ms) SELECT "repositories".* FROM "repositories" INNER JOIN "repositories_users" ON "repositories"."id" = "repositories_users"."repository_id" WHERE "repositories_
users"."user_id" = ? AND "repositories"."name" = ? ORDER BY name ASC LIMIT 1 [["user_id", 1], ["name", "Bloc-Jams"]]
CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."username" = ? LIMIT 1 [["username", "hd719"]]
CACHE (0.1ms) SELECT "repositories".* FROM "repositories" INNER JOIN "repositories_users" ON "repositories"."id" = "repositories_users"."repository_id" WHERE "repositories_users"."us
er_id" = ? AND "repositories"."name" = ? ORDER BY name ASC LIMIT 1 [["user_id", 1], ["name", "Bloc-Jams"]]
SimpleCaptcha::SimpleCaptchaData Load (0.2ms) SELECT "simple_captcha_data".* FROM "simple_captcha_data" WHERE "simple_captcha_data"."key" = ? ORDER BY "simple_captcha_data"."id" ASC
LIMIT 1 [["key", "438f5570aeba7ef4658ee2505ced9112e7221fa6"]]
(0.7ms) begin transaction
SQL (1.1ms) UPDATE "simple_captcha_data" SET "value" = ?, "updated_at" = ? WHERE "simple_captcha_data"."id" = ? [["value", "SJZSRC"], ["updated_at", "2017-04-26 01:02:29.640800"], ["
id", 1]]
(1.1ms) commit transaction
Rendered simple_captcha/_simple_captcha.erb (0.8ms)
Rendered repositories/repository.html.erb within layouts/application (42.4ms)
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
Completed 200 OK in 319ms (Views: 258.7ms | ActiveRecord: 4.9ms)
Started GET "/simple_captcha?code=438f5570aeba7ef4658ee2505ced9112e7221fa6&time=1493168549" for ::1 at 2017-04-25 21:02:30 -0400
SimpleCaptcha::SimpleCaptchaData Load (0.2ms) SELECT "simple_captcha_data".* FROM "simple_captcha_data" WHERE "simple_captcha_data"."key" = ? ORDER BY "simple_captcha_data"."id" ASC
LIMIT 1 [["key", "438f5570aeba7ef4658ee2505ced9112e7221fa6"]]
CACHE (0.0ms) SELECT "simple_captcha_data".* FROM "simple_captcha_data" WHERE "simple_captcha_data"."key" = ? ORDER BY "simple_captcha_data"."id" ASC LIMIT 1 [["key", "438f5570aeba
7ef4658ee2505ced9112e7221fa6"]]
I can also provide any other information that is requested.
-Thank you!
Upvotes: 0
Views: 251
Reputation: 5299
As I said in my comments the code posted by @emcconville worked for me on a windows PC.
It failed when using magick and as I suspected magick ( V7 ) needs the operators in a different order as it is stricter than V6. So this worked again for me on my PC:
magick -size 100x28 -background white -gravity Center -fill darkblue -pointsize 22 label:12345 -wave 2x92 -implode 0.2 "E:\Pictures\temp.jpg"
I would guess SimpleCapture is not V7 compatible; have you a V6 version you could try? I am using a V7 version but it also has a legacy V6 version built in but might not work on a mac?
Upvotes: 1