mojo_magick-0.6.8/0000755000004100000410000000000014452122120014025 5ustar www-datawww-datamojo_magick-0.6.8/Gemfile.lock0000644000004100000410000000261514452122120016253 0ustar www-datawww-dataPATH remote: . specs: mojo_magick (0.6.8) GEM remote: https://rubygems.org/ specs: ast (2.4.2) bundle-audit (0.1.0) bundler-audit bundler-audit (0.9.1) bundler (>= 1.2.0, < 3) thor (~> 1.0) docile (1.4.0) io-console (0.6.0) irb (1.6.3) reline (>= 0.3.0) json (2.6.3) minitest (5.18.0) parallel (1.23.0) parser (3.2.2.0) ast (~> 2.4.1) rainbow (3.1.1) rake (13.0.6) regexp_parser (2.8.0) reline (0.3.3) io-console (~> 0.5) rexml (3.2.5) rubocop (1.50.2) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) rubocop-ast (>= 1.28.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.28.0) parser (>= 3.2.1.0) rubocop-performance (1.17.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) thor (1.2.1) unicode-display_width (2.4.2) PLATFORMS ruby DEPENDENCIES bundle-audit bundler irb minitest mojo_magick! rake rubocop rubocop-performance simplecov BUNDLED WITH 1.17.2 mojo_magick-0.6.8/test/0000755000004100000410000000000014452122120015004 5ustar www-datawww-datamojo_magick-0.6.8/test/font_test.rb0000644000004100000410000000125314452122120017337 0ustar www-datawww-datarequire_relative "test_helper" IDENTIFY_FONT_RESPONSE = <<~EO_FONTS Font: Zapf-Dingbats family: Zapf Dingbats style: Normal stretch: Normal weight: 400 glyphs: /System/Library/Fonts/ZapfDingbats.ttf Font: Zapfino family: Zapfino style: Italic stretch: Normal weight: 400 glyphs: /Library/Fonts/Zapfino.ttf EO_FONTS class FontTest < MiniTest::Test def test_font f = MojoMagick::Font.new assert_nil f.name assert_equal f.valid?, false f = MojoMagick::Font.new(name: "Zapfino", weight: 400) assert_equal f.name, "Zapfino" assert_equal f.valid?, true assert_equal f.weight, 400 end end mojo_magick-0.6.8/test/fixtures/0000755000004100000410000000000014452122120016655 5ustar www-datawww-datamojo_magick-0.6.8/test/fixtures/roll with it.jpg0000644000004100000410000005753614452122120021700 0ustar www-datawww-dataPNG  IHDR4 HiCCPICC ProfileHWXS[RIhH RK E*I ĐD.*v*ZY+ZZTu`CM ~{9?%s@'桺K e i,R7@ (`˥ewy{ZC=P8S C|/@zR% &TոT3ոJexd'@YElȣ}b7@,@ q_@J CW<񲇱rioَ-yvpDeͰo7sG+1 ^Ifl TT"*Ym3M I^lF%B WZ,.&i| Z!%5<*"7)rߔR9c"qJ,3幉j̦Dĉ)@/DY,_>T/H$jpu()JóSoqPN' "k:dMX04AJǩ¼H bSyQ* R͏J y9q|b8 L0q{os/< @\4!TՌ^A "!f?kW-Ryh+T^h)Ԉs̓C9Ojb4/KgȒN #F# 1 e=1pE5MPM=,0t3^x(!7M >Fb0r4+o5|uōRFPB(zj;i{ ({uԹf38WȊ:\y!*ЁO10A`I L],3l `#v`h +:5pn`ABG1b"Έ!H !H6"Al;YT#zgr9t"H b( 5@P;t4ꋲh4 fh Z.E:tڄ@/.9ڏL cb q8,d\FW.q] “q>^ŗ ?_}`Jp&l Bpp>M݄D"I'1CE\B\OC$H$c3)G Ieu]cˤn{قA %JNQeEbKQeV%J7eGR9*j#4-|*Zgk}ӜhdvvNCBRz=$6CU-О]ݤ}YEV3UDRg%^].G;WF ~=^^z[O?d` kg|86 p r * v1L1,61{x˼{|l|2|j}n.=G w>?\rv<k?V8v؇V́]AMA]!!m!O؎.PPYw0,,2<=\?<9:^UDvDCD_WQQ7f\>7gܜqiщbbd1Ư'6Vq28!~B̈́ $2%L|,vC"-E'erJ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HB%VחcOHq*4_'pҳs 1;Ks,PBCBЫ[79}w8hRǠ8XBX;ɳgП}uI2:MS;xkTR;v{[,_۷GXÆ𦧸 (+.i~=I҅Ɓ2J͒6DwF75coJNET.`<(Id6c a9m5yPF,:7kSSa|^=ktSٺ XjPJ+6?,4pRĚJZsV t)if(+7M"b&B6T>'L1\oW| %g``J!;xF!MF 4! AA*ݔܙ8@V{k^ hC9^@IY>ş{鱢6Q2<.CzfMwB,z"25ҙwMİ#G/UO<==PfM'խc_3?  ;&h6eυz / @z%ًNp щZ&|n&'#)= ̱w n\K.Mi ZˡU͕\J>Mݒϯ6E[nơP7 P@,K"wh4pyޣc+Ť8*i~~5 m @Q+f2nJO>铖MCI.δZ" 50&2T7Ġjy3{%!p^ΛL(j8C #VY3B%21mVF\o"$gű`!q81)LOӴXO@qᜍeU .LPpIuBVʚ~y9 W_ Ĺ ™|ي]QvMtmMPCGp oQpΞ;O`y]0qS dcX F*- yۘpv8 b*~V,X:L NL6lέ2_>|$J`d ܢ@ʉ? aTdC4r8p8{˱c EjB=U~Ml4FBL-.73UŢ/>7:=`S?x߯5k' gÙSDMG< k4 |v~ـ;w"b9pq2YᱫaIT8hv9l߷_-Y|Gg,_ @ͯP#m)4GRs|EeuKq 5}Mi$АpOQlTUX5Mlc+d P:E5Y5GmFVϐ[g@h9ߢ?-rB(QrB<>tyWT7++qTv$^^0(s@ڠl=3~e@s3F]沎{OZAO .xqI%GWcdHHn|,/Gg4d==؆͆βfply]* hXE&+ :d8'rL󯧗\$ &CTxOOs u3gRLo:6 ebBjQO{85YDb*iH>'\4"(S Tc_8}$H{})}h%nr Uk#M2@)4VlDFl& ]h:^q#^|N*'.#y3 '՜*P8dhJ3Htk<Ϥ ~U+|hxNdF3QW hWrߥ13p}gt?"IENDB`mojo_magick-0.6.8/test/fixtures/zero_byte_image.jpg0000644000004100000410000000000014452122120022511 0ustar www-datawww-datamojo_magick-0.6.8/test/fixtures/not_an_image.jpg0000644000004100000410000002342114452122120022001 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^ԌnSI4cB@-t匎S;VuIO7lvE1<^^S*%T ʪ*Wq 4eVYТ D6gtq- l圁TdJN]F.l5H|MB-BUSn'E qc鴮YDcuUm*Á(W<P|jxz\2= \VMi}rEq>뙬d5ȠΥ` w<536j$`˵$osa.nVi~r 9(x;Hنཥw%[wT[^B$Ӫ䪼NGOug]&;j`s1jyd8RiO3],јbr/BmCuiW{MRK Ҕ7rFT ʿ.~NtY*o iҪ-+/.WTnef@I^)D?h$NqZUK~Xiu2!C3LY@{k`r|}֚YP{2f2[@)o!əTnCQ&wPI5jZ;lrWCy)Ąka-mr/N _TivSFZ߄|Ҡ):#I w!5ŀqၧ7lI 'q5M]$_EZXuDRe;⅄}pb}SIf2zPKX<~&mt jBJH Nq1a#"Zh9AF n"Ap4_SMwc#n oM%:_̊Jfad [ qMleڪ@:n1$mf.LwV0*ne=śB}M,FłӒ[ F.5l:Ѫs BÅ{GRX며[r ''^ :.Oz<)U{ÿ5/V~Y)m$_| >DM7VwXQ$(rs\^IHC=E^iEҦ "2Ɋ/8TUnqjYg(ѣg!JC^ };''9$ <+[/Ɯo!|^ǜ/q9;w{; gTF=6S"K8F_[vџ(I)v’pŃPH/`AX% ьsUK1>+mݸٻ1M gFl&fU,yyҵqR@3yeo1/z^0D^qN{56{N d@u̠*?A+:-O.s@FQ:QmYSʥ28<_?jLX׿^bֽ|% %ZS9<ű[KE\`: 8 .wK8ۓSw\(֛'A(Ix'qGS,4O4 $]KS6}ΗD(lH-ěɔ \BlVko%4+UaLh[5hwꓶ^ iA.R8ޣM.mojo_magick-0.6.8/test/fixtures/5742.jpg0000644000004100000410000007150514452122120017770 0ustar www-datawww-dataJFIF``C   %# , #&')*)-0-(0%()(C   (((((((((((((((((((((((((((((((((((((((((((((((((((M" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?ޜ D3NrN L .yn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c$9z j=J{^3FxF08c:CeXg vܜWAheܴ('H{O8ݑ8qXeۆ#Zz# t\2n`V2Ayϩb+Jz_2R(*+g'Ԍ 98MhHdW=}j&Nzu8!R"RyJ;JvM"+Tl̜{?Od;m56~S~U9=8\›wiҡ@R96L]amJGӽ\BB<犵 (Lԡw,@RC`ӊaȏUaۊ甭&lNqAON\9*1zLѢSF>J-=@A#`FP}9a׊Ҧ$@[=xK8Ԭ@p>1X^ݹy8;<]# QIq/SiI =)N}* S&<"J6r0GQH28=iGPxa3 `:zԝGP41ߧjnЇbF#)8ScܧSs@%ʜ QpU:8|4\ <Ҕܸ槕64sCN+2wCIjG8晷M0mԜ:Tkv(2r2j"N;UxTNGLQpV7Rc08# i+W9t Pa]S '{sA#y4vɭHOJǴܜ#\TAkZ+H00>TD`9 ` t1(<.#JzilJA .` }dE]1eQ}BӜGVBsWB82Dˡ⋈"UtM ҭ2? |ϭ dl/#Њ#֚Wv\e]]XqڥqeHCc&Ncq4v= ;[ޭjD Ew ~]F+qW$['sϥ2e 71py=6RI=*uW$qNx{)ϹÞژkQLG ϭ9g57 <x&ei8㊁>R[hEK qsϽR`£,=E>59#.1}iQp%+#j0;Ҫ{r)0 t7pE!vQJs׊k8Sg"evүq35W=LeTz 358u8 =2)'XavRG\wB$Vč6jO9e`F98REǞI q<+ 1XI劅W$^=;Q2# PX>œQ 1Xx>$8MS})rvqHi :sP {=袵%=?lQEf) nZOqqE:6gw7RcDqVǠQI"tcR=3QEH:9?xPR@` Dz(d`}qIp;QE!/Oʚ>QMUf<}3EENaRzKy~tQB$rD5SBW#rE"s٩GZ(%g?@i&9obG~8hQ*P&{ g( (ZQLD5g8Fz=("?:T2E ?mojo_magick-0.6.8/test/opt_builder_test.rb0000644000004100000410000001034414452122120020702 0ustar www-datawww-datarequire_relative "test_helper" class MojoMagickOptBuilderTest < MiniTest::Test # These tests make the assumption that if we call #raw_command with the # correct strings, ImageMagick itself will operate correctly. We're only # verifying that the option builder produces the correct strings def setup @builder = MojoMagick::OptBuilder.new end def test_annotate @builder.annotate "blah" assert_equal %w[-annotate 0 blah], @builder.to_a end def test_annotate_with_escapeable_string @builder.annotate "it's" assert_equal %w[-annotate 0 it's], @builder.to_a end def test_annotate_with_multiple_args @builder.annotate "5 it's" assert_equal ["-annotate", "0", "5 it's"], @builder.to_a end def test_annotate_with_geometry_args @builder.annotate "this thing", geometry: 3 assert_equal ["-annotate", "3", "this thing"], @builder.to_a end def test_annotate_with_full_array_args @builder.annotate "this", "thing", geometry: 3 assert_equal ["-annotate", "3", "thisthing"], @builder.to_a end def test_option_builder_with_blocks # Passing in basic commands produces a string @builder.image_block do @builder.background "red" end @builder.image_block do @builder.background "blue" end assert_equal ['\(', "-background", "red", '\)', '\(', "-background", "blue", '\)'], @builder.to_a end def test_option_builder_with_hex_colors @builder.background "#000000" assert_equal %w[-background #000000], @builder.to_a end def test_option_builder @builder.strip @builder.repage assert_equal %w[-strip -repage], @builder.to_a end def test_opt_builder_chaining_commands assert_equal %w[-strip -repage], @builder.strip.repage.to_a end def test_opt_builder_interpreting_bang_suffix # Bang (!) indicates the plus version of commands @builder.repage @builder.repage! assert_equal %w[-repage +repage], @builder.to_a end def test_opt_builder_pushing_raw_data # Treats an array of raw data as different arguments @builder << ["leave this data", "alone"] assert_equal ["leave this data", "alone"], @builder.to_a end def test_opt_builder_complex_command_arg @builder.extent "256x256+0+0" @builder.crop "64x64" assert_equal %w[-extent 256x256+0+0 -crop 64x64], @builder.to_a end def test_opt_builder_multi_arg_command_quoting # Multi-argument commands should not be quoted together @builder.set "comment", 'the "best" comment' assert_equal ["-set", "comment", "the \"best\" comment"], @builder.to_a end def test_opt_builder_with_custom_commands_and_raw_data # Accepts raw data as-is @builder.opt1 @builder << "a ! b !" @builder.opt2 assert_equal ["-opt1", "a ! b !", "-opt2"], @builder.to_a end def test_opt_builder_file_and_files # File and files are helper methods @builder.files "source.jpg", "source2.jpg" @builder.append @builder.crop "64x64" @builder.file "dest%d.jpg" assert_equal %w[source.jpg source2.jpg -append -crop 64x64 dest%d.jpg], @builder.to_a end def test_opt_builder_file_preserves_whitespace @builder.file "probably on windows.jpg" assert_equal ["probably on windows.jpg"], @builder.to_a end def test_opt_builder_comment @builder.comment "white space" @builder.comment "w&b" @builder.crop "6x6^" assert_equal ["-comment", "white space", "-comment", "w&b", "-crop", "6x6^"], @builder.to_a end def test_opt_builder_comment_with_quoted_elements @builder.comment 'Fred "Woot" Rook' assert_equal ["-comment", "Fred \"Woot\" Rook"], @builder.to_a end def test_opt_builder_blob_writes_data_to_temp_file @builder.blob "binary data" filename = @builder.to_a.first File.open(filename, "rb") do |f| assert_equal "binary data", f.read end end def test_opt_builder_label # label for text should use 'label:"the string"' if specified [%w[mylabel mylabel], ['my " label', '"my \" label"'], ["Rock it, cuz i said so!", '"Rock it, cuz i said so!"'], ["it's like this", '"it\'s like this"'], ["\#$%^&*", '"#$%^&*"']].each do |labels| b = MojoMagick::OptBuilder.new b.label labels[0] assert_equal ["label:#{labels[1]}"], b.to_a end end end mojo_magick-0.6.8/test/font_parser_test.rb0000644000004100000410000000120514452122120020710 0ustar www-datawww-datarequire_relative "test_helper" IDENTIFY_FONT_RESPONSE = <<~EOFONT Font: Zapf-Dingbats family: Zapf Dingbats style: Normal stretch: Normal weight: 400 glyphs: /System/Library/Fonts/ZapfDingbats.ttf Font: Zapfino family: Zapfino style: Italic stretch: Normal weight: 400 glyphs: /Library/Fonts/Zapfino.ttf EOFONT class FontParserTest < MiniTest::Test def test_parse_fonts parser = MojoMagick::Util::FontParser.new(IDENTIFY_FONT_RESPONSE) parsed_fonts = parser.parse assert_equal parsed_fonts.length, 2 assert_equal parsed_fonts[1].style, "Italic" end end mojo_magick-0.6.8/test/mojo_magick_test.rb0000644000004100000410000002212314452122120020647 0ustar www-datawww-datarequire_relative "test_helper" class MojoMagickTest < MiniTest::Test # we keep a fixtures path and a working path so that we can easily test image # manipulation routines without tainting the original images def setup @fixtures_path = File.expand_path(File.join(File.dirname(__FILE__), "fixtures")) @working_path = File.join(@fixtures_path, "tmp") reset_images @test_image = File.join(@working_path, "5742.jpg") @out_image = File.join(@working_path, "out1.jpg") end def reset_images FileUtils.rm_r(@working_path) if File.exist?(@working_path) FileUtils.mkdir(@working_path) Dir.glob(File.join(@fixtures_path, "*")).each do |file| FileUtils.cp(file, @working_path) if File.file?(file) end end def test_get_image_size orig_image_size = File.size(@test_image) retval = MojoMagick.get_image_size(@test_image) assert_equal orig_image_size, File.size(@test_image) assert_equal 500, retval[:height] assert_equal 333, retval[:width] end def test_image_resize # test basic resizing orig_image_size = File.size(@test_image) size_test_temp = Tempfile.new("mojo_test") size_test = size_test_temp.path retval = MojoMagick.resize(@test_image, size_test, { width: 100, height: 100 }) assert_equal size_test, retval assert_equal orig_image_size, File.size(@test_image) assert_equal retval, size_test new_dimensions = MojoMagick.get_image_size(size_test) assert_equal 100, new_dimensions[:height] assert_equal 67, new_dimensions[:width] # we should be able to resize image right over itself retval = MojoMagick.resize(@test_image, @test_image, { width: 150, height: 150 }) assert_equal @test_image, retval refute_equal orig_image_size, File.size(@test_image) new_dimensions = MojoMagick.get_image_size(@test_image) assert_equal 150, new_dimensions[:height] assert_equal 100, new_dimensions[:width] end def test_image_resize_with_percentage original_size = MojoMagick.get_image_size(@test_image) retval = MojoMagick.resize(@test_image, @test_image, { percent: 50 }) assert_equal @test_image, retval new_dimensions = MojoMagick.get_image_size(@test_image) %i[height width].each do |dim| assert_equal (original_size[dim] / 2.0).ceil, new_dimensions[dim] end end def test_shrink_with_big_dimensions # image shouldn't resize if we specify very large dimensions and specify "shrink_only" size_test_temp = Tempfile.new("mojo_test") size_test = size_test_temp.path retval = MojoMagick.shrink(@test_image, size_test, { width: 1000, height: 1000 }) assert_equal size_test, retval new_dimensions = MojoMagick.get_image_size(@test_image) assert_equal 500, new_dimensions[:height] assert_equal 333, new_dimensions[:width] end def test_shrink # image should resize if we specify small dimensions and shrink_only retval = MojoMagick.shrink(@test_image, @test_image, { width: 1000, height: 100 }) assert_equal @test_image, retval new_dimensions = MojoMagick.get_image_size(@test_image) assert_equal 100, new_dimensions[:height] assert_equal 67, new_dimensions[:width] end def test_resize_with_shrink_only_options # image should resize if we specify small dimensions and shrink_only retval = MojoMagick.resize(@test_image, @test_image, { shrink_only: true, width: 400, height: 400 }) assert_equal @test_image, retval new_dimensions = MojoMagick.get_image_size(@test_image) assert_equal 400, new_dimensions[:height] assert_equal 266, new_dimensions[:width] end def test_expand_with_small_dim # image shouldn't resize if we specify small dimensions and expand_only _orig_image_size = File.size(@test_image) retval = MojoMagick.expand(@test_image, @test_image, { width: 10, height: 10 }) assert_equal @test_image, retval new_dimensions = MojoMagick.get_image_size(@test_image) assert_equal 500, new_dimensions[:height] assert_equal 333, new_dimensions[:width] end def test_expand # image should resize if we specify large dimensions and expand_only retval = MojoMagick.expand(@test_image, @test_image, { width: 1000, height: 1000 }) assert_equal @test_image, retval new_dimensions = MojoMagick.get_image_size(@test_image) assert_equal 1000, new_dimensions[:height] assert_equal 666, new_dimensions[:width] end def test_invalid_images # test bad images bad_image = File.join(@working_path, "not_an_image.jpg") zero_image = File.join(@working_path, "zero_byte_image.jpg") assert_raises(MojoMagick::MojoFailed) { MojoMagick.get_image_size(bad_image) } assert_raises(MojoMagick::MojoFailed) { MojoMagick.get_image_size(zero_image) } assert_raises(MojoMagick::MojoFailed) do MojoMagick.get_image_size("/file_does_not_exist_here_ok.jpg") end end def test_resize_with_fill @test_image = File.join(@working_path, "5742.jpg") MojoMagick.resize(@test_image, @test_image, { fill: true, width: 100, height: 100 }) dim = MojoMagick.get_image_size(@test_image) assert_equal 100, dim[:width] assert_equal 150, dim[:height] end def test_resize_with_fill_and_crop @test_image = File.join(@working_path, "5742.jpg") MojoMagick.resize(@test_image, @test_image, { fill: true, crop: true, width: 150, height: 120 }) dim = MojoMagick.get_image_size(@test_image) assert_equal 150, dim[:width] assert_equal 120, dim[:height] end def test_tempfile # Create a tempfile and return the path filename = MojoMagick.tempfile("binary data") File.open(filename, "rb") do |f| assert_equal f.read, "binary data" end end def test_label out_image = File.join(@working_path, "label_test.png") MojoMagick.convert do |c| c.label "rock the house" c.file out_image end end def test_label_with_quote out_image = File.join(@working_path, "label_test.png") MojoMagick.convert do |c| c.label 'rock "the house' c.file out_image end end def test_label_with_apostrophe out_image = File.join(@working_path, "label_test.png") MojoMagick.convert do |c| c.label "rock 'the house" c.file out_image end end def test_label_with_quotes out_image = File.join(@working_path, "label_test.png") MojoMagick.convert do |c| c.label 'this is "it!"' c.file out_image end end def test_bad_command MojoMagick.convert do |c| c.unknown_option "fail" c.file "boogabooga.whatever" end rescue MojoMagick::MojoFailed => e assert e.message.include?("unrecognized option"), "Unable to find ImageMagick commandline error in the message" assert e.message.include?("convert.c/ConvertImageCommand"), "Unable to find ImageMagick commandline error in the message" end def test_blob_rgb data = (Array.new(16) { [(rand > 0.5) ? 0 : 255] * 3 }).flatten bdata = data.pack "C" * data.size out = "out.png" MojoMagick.convert(nil, "png:#{out}") do |c| c.blob bdata, format: :rgb, depth: 8, size: "4x4" end r = MojoMagick.get_image_size(out) assert r[:height] == 4 assert r[:width] == 4 end def test_convert MojoMagick.convert do |c| c.file @test_image c.crop "92x64+0+0" c.repage! c.file @out_image end retval = MojoMagick.get_image_size(@out_image) assert_equal 92, retval[:width] assert_equal 64, retval[:height] end def test_mogrify MojoMagick.convert do |c| c.file @test_image c.file @out_image end # Simple mogrify test MojoMagick.mogrify do |m| m.crop "32x32+0+0" m.repage! m.file @out_image end retval = MojoMagick.get_image_size(@out_image) assert_equal 32, retval[:width] assert_equal 32, retval[:height] end def test_convert_crop_and_repage MojoMagick.convert(@test_image, @out_image) do |c| c.crop "100x100+0+0" c.repage! end retval = MojoMagick.get_image_size(@out_image) assert_equal 100, retval[:width] assert_equal 100, retval[:height] end def test_mogrify_with_shave_and_repage MojoMagick.convert do |c| c.file @test_image c.crop "100x100+0+0" c.file @out_image end MojoMagick.mogrify(@out_image) { |m| m.shave("25x25").repage! } retval = MojoMagick.get_image_size(@out_image) assert_equal 50, retval[:width] assert_equal 50, retval[:height] end def test_convert_rgb bdata = "aaaaaabbbbbbccc" out = "out.png" MojoMagick.convert do |c| c.blob bdata, format: :rgb, depth: 8, size: "5x1" c.file out end r = MojoMagick.get_image_size(out) assert r[:height] == 1 assert r[:width] == 5 end def test_convert_rgba bdata = "1111222233334444" out = "out.png" MojoMagick.convert do |c| c.blob bdata, format: :rgba, depth: 8, size: "4x1" c.file out end r = MojoMagick.get_image_size(out) assert r[:height] == 1 assert r[:width] == 4 end def test_available_fonts fonts = MojoMagick.available_fonts assert fonts.is_a? Array assert fonts.length > 1 assert fonts.first.name assert(fonts.first.name.is_a?(String)) end end mojo_magick-0.6.8/test/test_helper.rb0000644000004100000410000000026114452122120017646 0ustar www-datawww-datarequire "simplecov" SimpleCov.start require "minitest/autorun" require File.expand_path(File.join(File.dirname(__FILE__), "..", "init")) require "fileutils" require "tempfile" mojo_magick-0.6.8/README.md0000644000004100000410000002343314452122120015311 0ustar www-datawww-dataMojoMagick ========== MojoMagick is a "dog simple, do very little" image library. It is basically a couple of stateless module methods that make it somewhat more convenient than calling ImageMagick by hand. The main reason to use MojoMagick is that you should consolidate your ImageMagick calls into one place, so why not do it here? If you improve on this tool, send me the patch. This tool came about because I wanted a fast, simple, lightweight, nothing-goes-wrong-with-it- because-it's-too-simple-to-break image tool. [![Gem Version](https://badge.fury.io/rb/mojo_magick.png)](http://badge.fury.io/rb/mojo_magick) [![Build Status](https://circleci.com/gh/rcode5/mojo_magick/tree/master.svg?style=shield&circle-token=8d2252bd460bf1a7cdaad5c2e169698605afb981)]() Using it ======== Add to your Gemfile gem 'mojo_magick' Require it in your ruby code require 'mojo_magick' Go to town! Check out a couple of simple [examples, here](examples/) Examples ======== ## Image Resizing ### Obtain the size of an image (assuming image is "120wx222h") dimensions = MojoMagick::get_image_size(test_image) # ==> dimensions now holds a hash: {:height => 120, :width => 222} ### Resize an image so that it fits within a 100w x 200h bounding box (Note: this will scale an image either up or down to fit these dimensions which may not be what you want.) In this example, we overwrite our image, but if you pass in a different file for the second file name, a new file will be created with the resized dimensions MojoMagick::resize('/img/test.jpg', '/img/test.jpg', {:width=>100, :height=>200}) ### Resize an image so that it fills a 100 x 100 bounding box After this transformation, your image's short side will be 100px. This will preserve the aspect ratio. MojoMagick::resize('/img/infile.jpg', '/img/outfile.jpg', {:width=>100, :height=>100, :fill => true}) ### Resize an image so that it fills and is cropped to a 100 x 100 bounding box After this transformation, your image will be 100x100. But it does not distort the images. It crops out of the Center. MojoMagick::resize('/img/infile.jpg', '/img/outfile.jpg', {:width=>100, :height=>100, :fill => true, :crop => true}) ### Code sample of how to shrink all jpg's in a folder require 'mojo_magick' image_folder = '/tmp/img' Dir::glob(File::join(image_folder, '*.jpg')).each do |image| begin # shrink all the images *in place* to no bigger than 60pix x 60pix MojoMagick::shrink(image, image, {:width => 60, :height => 60}) puts "Shrunk: #{image}" rescue MojoMagick::MojoFailed => e STDERR.puts "Unable to shrink image '#{image}' - probably an invalid image\n#{e.message}" rescue MojoMagick::MojoMagickException => e STDERR.puts "Unknown exception on image '#{image}'\n#{e.message}" end end ## Setting Memory/Resource limits for ImageMagick Be sure you're upgraded to the current release of ImageMagick. set limits on disk, area, map and ram usage obtain/print a hash of default limits: puts MojoMagick::get_default_limits.inspect current\_limits shows same values: puts MojoMagick::get_current_limits.inspect MojoMagick::set_limits(:area => '32mb', :disk => '0', :memory => '64mb', :map => '32mb') puts MojoMagick::get_current_limits.inspect As of ImageMagick 6.6, you also have the ability to set `:threads` and `:time`. Read [ImageMagick docs on limits](http://www.imagemagick.org/script/command-line-options.php#limit) for more info. ## For more complex operations (thanks to Elliot Nelson for adding this code to the system) Two command-line builders, #convert and #mogrify, have been added to simplify complex commands. ### using #convert MojoMagick::convert('source.jpg', 'dest.jpg') do |c| c.crop '250x250+0+0' c.repage! c.strip c.set 'comment', 'my favorite file' end # Equivalent to: MojoMagick::raw_command('convert', 'source.jpg -crop 250x250+0+0 +repage -strip -set comment "my favorite file" dest.jpg') ### using #mogrify MojoMagick::mogrify('image.jpg') {|i| i.shave '10x10'} # Equivalent to: MojoMagick::raw_command('mogrify', '-shave 10x10 image.jpg') # Example showing some additional options: # assuming binary data that is rgb, 8bit depth and 10x20 pixels, :format => :rgb, :depth => 8, :size => '10x20'OAu MojoMagick::convert do |c| c.file 'source.jpg' c.blob my_binary_data, :format => :rgb, :depth => 8, :size => '10x20' c.append c.crop '256x256+0+0' c.repage! c.file 'output.jpg' end # Use .file to specify file names, .blob to create and include a tempfile. The # bang (!) can be appended to command names to use the '+' versions # instead of '-' versions. ### Create a brand new image from data binary_data = '1111222233334444' MojoMagick::convert do |c| c.rgba8 binary_data, :format => :rgba, :depth => 8, :size => '2x2' c.file 'output.jpg' end ### Get a list of available fonts fonts = MojoMagick::available_fonts fonts.first => # ### Create a new image with text Note: Use with care. If you don't have fonts installed ImageMagick can spin off wildly leaving MojoMagick not knowing what to do. For Unix/MacOSX, you should install `freetype` and `ghostscript`. MojoMagick::convert(nil, fname) do |c| c.background 'black' c.fill 'white' c.gravity 'center' c.pointsize 80 c.size '200x200' c.label 'the bird is the word' end ### Generate a composite MojoMagick::convert(nil, 'composite_out.png') do |c| c.size '200x200' c.image_block do # first layer c.background 'blue' c.fill 'white' c.gravity 'northwest' c.label 'NW' end c.image_block do # second layer c.background 'transparent' c.fill 'red' c.gravity 'southeast' c.label 'SE' end c.composite end Dependencies ============ This library has (in the past) been good for ruby 1.8.7 and beyond. Recent mods (as of 0.5.x) will require a more recent ruby (>1.9.3). If you're running on 1.8.7, you should be able to safely use 0.4.3 Do this by pinning it in your Gemfile gem 'mojo_magick', '0.4.3' Availablility ============= * [Github Repo](http://github.com/rcode5/mojo_magick) This is the current canonical branch. * Issues/Pull Requests can be submitted through the above repository. Contributions ============= Got a fix? Got a feature? * fork it * make a branch (named appropriately) * write your code * write your tests * test it (`rake` will run the tests) * submit a pull request Note: please don't change the version. We'll do that when we merge in the new code Recent Changes ============== #### Version 0.6.7 * Bundle update #### Version 0.6.6 * Bundle update #### Version 0.6.5 * Bundle update #### Version 0.6.4 * Fix issue with `identity -list font` returning exit code 1 on some systems (Ubuntu) with PR #https://github.com/rcode5/mojo_magick/pull/35 35 #### Version 0.6.3 * Major cleanup and refactor (https://github.com/rcode5/mojo_magick/pull/33) * Deprecated `MojoMagick.get_fonts` in favor of `MojoMagick.available_fonts` * Moved `raw_command` and `execute` and `execute!` methods into their own module (and added deprecation warnings) * Renamed `Util::Parser` to `Util::FontParser` because that's what it does * Overall rubocop and ruby clean up #### Version 0.6.2 * fix `annotate` option. Now it takes keyword arguments for geometry. #### Version 0.6.1 * pushed and yanked - defunct version #### Version 0.6.0 * general cleanup and update gems - ready for ImageMagick 7 * dumped resource limit handling * PR #29, #30 #### Version 0.5.6 * add `get_format` method to help with quoted source file #### Version 0.5.5 * Refactor raw_command into execute! and execute methods so that for cases where we don't care about exit status, it can be easily ignored #### Version 0.5.4 * Include image magick commandline failure from raw_command (on failure) * moved to Popen3 * added checks for Popen3 on windows * updated README to include info about submissions * probably no good for ruby 1.8.7 anymore #### Version 0.5.1 * add `LICENSE.txt` and update README * add `examples/` directory * add support for fonts * add support for building multi-layer images with image blocks (no explicit temp file creation) * [Moved repo to rcode5](http://github.com/rcode5/mojo_magick) Current support and maintenance is happening here. * added `simplecov` for test coverage reports #### Versions 0.4.x * Add rake tasks for gem building and tests * code cleanup * better handling of `gravity` parameter #### Version 0.3.0 * Add new github repo * added gemspec for building gem with bundler * updated tests for ImageMagick 6.6 * added ability to do fill + crop resizing * bumped version to 0.3.0 * [new github repo](https://github.com/bunnymatic/mojo_magick) References ========== * [Original SVN MojoMagick repository](http://www.misuse.org/science/2008/01/30/mojomagick-ruby-image-library-for-imagemagick/) - Initiated and developed by Steve Midgley * [ImageMagick](http://www.imagemagick.org/) * [FreeType](http://www.freetype.org) * [Ghostscript](http://www.ghostscript.com/) Copyright (c) 2013 Jon Rogers Copyright (c) 2008 Steve Midgley, released under the [MIT license](LICENSE.txt) Credit to Elliot Nelson for significant code contributions. Thanks Elliot! mojo_magick-0.6.8/.circleci/0000755000004100000410000000000014452122120015660 5ustar www-datawww-datamojo_magick-0.6.8/.circleci/config.yml0000644000004100000410000000113414452122120017647 0ustar www-datawww-dataversion: 2.1 orbs: ruby: circleci/ruby@1.1.4 jobs: build: docker: - image: circleci/ruby:2.6.6-browsers executor: ruby/default steps: - checkout - run: name: Which bundler? command: bundle -v - ruby/install-deps - run: name: install imagemagick command: sudo apt-get install imagemagick ghostscript - run: name: tests command: bundle exec rake - run: name: audit command: bundle exec bundle-audit update && bundle exec bundle-audit check - ruby/rubocop-check mojo_magick-0.6.8/mojo_magick.gemspec0000644000004100000410000000246614452122120017661 0ustar www-datawww-data$LOAD_PATH.push File.expand_path("lib", __dir__) require "mojo_magick/version" post_install_message = <<~EOPOST_INSTALL Thanks for installing MojoMagick - keepin it simple! *** To make this gem work, you need a few binaries! Make sure you've got ImageMagick available. http://imagemagick.org If you plan to build images with text (using the "label" method) you'll need freetype and ghostscript as well. Check out http://www.freetype.org and http://ghostscript.com respectively for installation info. EOPOST_INSTALL Gem::Specification.new do |s| s.name = "mojo_magick" s.license = "MIT" s.version = MojoMagick::VERSION s.platform = Gem::Platform::RUBY s.authors = ["Steve Midgley", "Elliot Nelson", "Jon Rogers"] s.email = ["science@misuse.org", "jon@rcode5.com"] s.homepage = "http://github.com/rcode5/mojo_magick" s.summary = "mojo_magick-#{MojoMagick::VERSION}" s.description = "Simple Ruby stateless module interface to imagemagick." s.required_ruby_version = ">= 2.6.0" s.rubyforge_project = "mojo_magick" s.files = `git ls-files`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) } s.require_paths = ["lib"] s.post_install_message = post_install_message s.metadata["rubygems_mfa_required"] = "true" end mojo_magick-0.6.8/.rubocop.yml0000644000004100000410000000027114452122120016277 0ustar www-datawww-datarequire: - rubocop-performance inherit_from: - ./.rubocop-common.yml - ./.rubocop-performance.yml Metrics/CyclomaticComplexity: Max: 10 Metrics/PerceivedComplexity: Max: 10 mojo_magick-0.6.8/init.rb0000644000004100000410000000012214452122120015310 0ustar www-datawww-datarequire File.expand_path(File.join(File.dirname(__FILE__), "lib", "mojo_magick")) mojo_magick-0.6.8/.gitignore0000644000004100000410000000012514452122120016013 0ustar www-datawww-data*~ test/fixtures/tmp fixtures/tmp coverage/ .bundle/ .\#* \#* out.png out.html *.gem mojo_magick-0.6.8/.rubocop-performance.yml0000644000004100000410000000004614452122120020576 0ustar www-datawww-dataPerformance/Casecmp: Enabled: false mojo_magick-0.6.8/.rubocop-common.yml0000644000004100000410000000310114452122120017560 0ustar www-datawww-dataAllCops: NewCops: enable DisplayCopNames: true DisplayStyleGuide: true Exclude: - "bin/*" - "db/schema.rb" - "lib/templates/**/*" - "**/node_modules/**/*" - "tmp/**/*" - "vendor/**/*" - "log/**/*" Layout/CaseIndentation: Enabled: false Layout/FirstArrayElementIndentation: EnforcedStyle: consistent Layout/HashAlignment: Enabled: false Layout/LineLength: Max: 120 Layout/MultilineMethodCallIndentation: EnforcedStyle: indented Lint/AmbiguousBlockAssociation: Enabled: false Lint/ScriptPermission: Exclude: - "Rakefile" Metrics/AbcSize: Max: 35 Exclude: - "spec/**/*" Metrics/BlockLength: CountComments: false Max: 50 Exclude: - "config/**/*" - "spec/**/*" Metrics/ClassLength: Max: 250 Exclude: - "spec/**/*" Metrics/MethodLength: Max: 25 Exclude: - "db/migrate/*" - "spec/**/*" Naming/PredicateName: Enabled: false Security/YAMLLoad: Enabled: false Style/BarePercentLiterals: EnforcedStyle: percent_q Style/BlockDelimiters: EnforcedStyle: braces_for_chaining Style/Documentation: Enabled: false Style/EmptyMethod: EnforcedStyle: expanded Style/FrozenStringLiteralComment: EnforcedStyle: never Style/Lambda: EnforcedStyle: literal Style/ModuleFunction: EnforcedStyle: extend_self Style/MutableConstant: Enabled: false Style/PreferredHashMethods: Enabled: false Style/StringLiterals: EnforcedStyle: double_quotes Style/StringLiteralsInInterpolation: EnforcedStyle: double_quotes Style/TernaryParentheses: EnforcedStyle: require_parentheses_when_complex mojo_magick-0.6.8/examples/0000755000004100000410000000000014452122120015643 5ustar www-datawww-datamojo_magick-0.6.8/examples/animated_gif.rb0000755000004100000410000000057714452122120020613 0ustar www-datawww-data#!/usr/bin/env ruby require "mojo_magick" MojoMagick.convert(nil, "animated.gif") do |c| c.size "200x200" c.delay 100 c.image_block do # first layer c.background "blue" c.fill "white" c.gravity "northwest" c.label "NW" end c.image_block do # second layer c.background "transparent" c.fill "red" c.gravity "southeast" c.label "SE" end end mojo_magick-0.6.8/examples/composite.rb0000755000004100000410000000062214452122120020175 0ustar www-datawww-data#!/usr/bin/env ruby require "mojo_magick" MojoMagick.convert(nil, "composite_out.png") do |c| c.size "200x200" c.delay 100 c.image_block do # first layer c.background "blue" c.fill "white" c.gravity "northwest" c.label "NW" end c.image_block do # second layer c.background "transparent" c.fill "red" c.gravity "southeast" c.label "SE" end c.composite end mojo_magick-0.6.8/Rakefile0000644000004100000410000000064414452122120015476 0ustar www-datawww-datarequire "rubygems" require "simplecov" require "rake/testtask" task default: [:test] Rake::TestTask.new do |t| t.libs = ["minitest"] t.test_files = Dir.glob(File.join(File.dirname(__FILE__), "test/*_test.rb")) t.verbose = true end desc "Build gem" task :build do `rm mojo_magick-*.gem` puts `gem build mojo_magick.gemspec` end desc "Release" task release: :build do puts `gem push mojo_magick-*.gem` end mojo_magick-0.6.8/lib/0000755000004100000410000000000014452122120014573 5ustar www-datawww-datamojo_magick-0.6.8/lib/image_magick/0000755000004100000410000000000014452122120017170 5ustar www-datawww-datamojo_magick-0.6.8/lib/image_magick/fonts.rb0000644000004100000410000000033414452122120020646 0ustar www-datawww-datamodule ImageMagick class Fonts def self.all raw_fonts = MojoMagick::Commands.send(:execute, "identify", "-list", "font").return_value MojoMagick::Util::FontParser.new(raw_fonts).parse end end end mojo_magick-0.6.8/lib/mojo_magick.rb0000644000004100000410000001524414452122120017405 0ustar www-datawww-datarequire "tempfile" require "open3" require_relative "./mojo_magick/util/font_parser" require_relative "./mojo_magick/errors" require_relative "./mojo_magick/command_status" require_relative "./mojo_magick/commands" require_relative "./image_magick/fonts" require_relative "./mojo_magick/opt_builder" require_relative "./mojo_magick/font" # MojoMagick is a stateless set of module methods which present a convient interface # for accessing common tasks for ImageMagick command line library. # # MojoMagick is specifically designed to be efficient and simple and most importantly # to not leak any memory. For complex image operations, you will find MojoMagick limited. # You might consider the venerable MiniMagick or RMagick for your purposes if you care more # about ease of use rather than speed and memory management. # all commands raise "MojoMagick::MojoFailed" if command fails (ImageMagick determines command success status) # Two command-line builders, #convert and #mogrify, have been added to simplify # complex commands. Examples included below. # # Example #convert usage: # # MojoMagick::convert('source.jpg', 'dest.jpg') do |c| # c.crop '250x250+0+0' # c.repage! # c.strip # c.set 'comment', 'my favorite file' # end # # Equivalent to: # # MojoMagick::Commands.raw_command('convert', 'source.jpg -crop 250x250+0+0\ # +repage -strip -set comment "my favorite file" dest.jpg') # # Example #mogrify usage: # # MojoMagick::mogrify('image.jpg') {|i| i.shave '10x10'} # # Equivalent to: # # MojoMagick::Commands.raw_command('mogrify', '-shave 10x10 image.jpg') # # Example showing some additional options: # # MojoMagick::convert do |c| # c.file 'source.jpg' # c.blob my_binary_data # c.append # c.crop '256x256+0+0' # c.repage! # c.file 'output.jpg' # end # # Use .file to specify file names, .blob to create and include a tempfile. The # bang (!) can be appended to command names to use the '+' versions # instead of '-' versions. # module MojoMagickDeprecations # rubocop:disable Naming/AccessorMethodName def get_fonts warn "DEPRECATION WARNING: #{__method__} is deprecated and will be removed with the next minor version release. " \ "Please use `available_fonts` instead" MojoMagick.available_fonts end # rubocop:enable Naming/AccessorMethodName ### Moved to `Commands` def execute!(*args) warn "DEPRECATION WARNING: #{__method__} is deprecated and will be removed with the next minor version release. " \ "Please use `MojoMagick::Commands.execute!` instead" MojoMagick::Commands.send(:execute!, *args) end def execute(*args) warn "DEPRECATION WARNING: #{__method__} is deprecated and will be removed with the next minor version release. " \ "Please use `MojoMagick::Commands.execute!` instead" MojoMagick::Commands.send(:execute, *args) end def raw_command(*args) warn "DEPRECATION WARNING: #{__method__} is deprecated and will be removed with the next minor version release. " \ "Please use `MojoMagick::Commands.execute!` instead" MojoMagick::Commands.raw_command(*args) end end module MojoMagick extend MojoMagickDeprecations def self.windows? !RUBY_PLATFORM.include(win32) end def self.shrink(source_file, dest_file, options) opts = options.dup opts.delete(:expand_only) MojoMagick.resize(source_file, dest_file, opts.merge(shrink_only: true)) end def self.expand(source_file, dest_file, options) opts = options.dup opts.delete(:shrink_only) MojoMagick.resize(source_file, dest_file, opts.merge(expand_only: true)) end # resizes an image and returns the filename written to # options: # :width / :height => scale to these dimensions # :scale => pass scale options such as ">" to force shrink scaling only or # "!" to force absolute width/height scaling (do not preserve aspect ratio) # :percent => scale image to this percentage (do not specify :width/:height in this case) def self.resize(source_file, dest_file, options) scale_options = extract_scale_options(options) geometry = extract_geometry_options(options) extras = [] if !options[:fill].nil? && !options[:crop].nil? extras << "-gravity" extras << "Center" extras << "-extent" extras << geometry.to_s end Commands.raw_command("convert", source_file, "-resize", "#{geometry}#{scale_options}", *extras, dest_file) dest_file end def self.convert(source = nil, dest = nil) opts = OptBuilder.new opts.file source if source yield opts opts.file dest if dest Commands.raw_command("convert", *opts.to_a) end def self.mogrify(dest = nil) opts = OptBuilder.new yield opts opts.file dest if dest Commands.raw_command("mogrify", *opts.to_a) end def self.available_fonts # returns width, height of image if available, nil if not Font.all end def self.get_format(source_file, format_string) Commands.raw_command("identify", "-format", format_string, source_file) end # returns an empty hash or a hash with :width and :height set (e.g. {:width => INT, :height => INT}) # raises MojoFailed when results are indeterminate (width and height could not be determined) def self.get_image_size(source_file) # returns width, height of image if available, nil if not retval = get_format(source_file, "w:%w h:%h") return {} unless retval width = retval.match(/w:([0-9]+) /) width = width ? width[1].to_i : nil height = retval.match(/h:([0-9]+)/) height = height ? height[1].to_i : nil raise(MojoFailed, "Indeterminate results in get_image_size: #{source_file}") if !height || !width { width: width, height: height } end def self.tempfile(*opts) data = opts[0] rest = opts[1] ext = rest && rest[:format] file = Tempfile.new(["mojo", ext ? ".#{ext}" : ""]) file.binmode file.write(data) file.path ensure file.close end class << self private def extract_geometry_options(options) if !options[:width].nil? && !options[:height].nil? "#{options[:width]}X#{options[:height]}" elsif !options[:percent].nil? "#{options[:percent]}%" else raise MojoMagickError, "Resize requires width and height or percentage: #{options.inspect}" end end def extract_scale_options(options) [].tap { |scale_options| scale_options << ">" unless options[:shrink_only].nil? scale_options << "<" unless options[:expand_only].nil? scale_options << "!" unless options[:absolute_aspect].nil? scale_options << "^" unless options[:fill].nil? }.join end end end mojo_magick-0.6.8/lib/mojo_magick/0000755000004100000410000000000014452122120017052 5ustar www-datawww-datamojo_magick-0.6.8/lib/mojo_magick/version.rb0000644000004100000410000000005214452122120021061 0ustar www-datawww-datamodule MojoMagick VERSION = "0.6.8" end mojo_magick-0.6.8/lib/mojo_magick/font.rb0000644000004100000410000000060614452122120020347 0ustar www-datawww-datamodule MojoMagick class Font attr_accessor :name, :family, :style, :stretch, :weight, :glyphs def valid? !name.nil? end def initialize(property_hash = {}) %i[name family style stretch weight glyphs].each do |f| setter = "#{f}=" send(setter, property_hash[f]) end end def self.all ImageMagick::Fonts.all end end end mojo_magick-0.6.8/lib/mojo_magick/command_status.rb0000644000004100000410000000035214452122120022420 0ustar www-datawww-datamodule MojoMagick CommandStatus = Struct.new(:command, :return_value, :error, :system_status) do def success? system_status.success? end def exit_code system_status.exitstatus || "unknown" end end end mojo_magick-0.6.8/lib/mojo_magick/errors.rb0000644000004100000410000000024414452122120020713 0ustar www-datawww-datamodule MojoMagick class MojoMagickException < StandardError; end class MojoError < MojoMagickException; end class MojoFailed < MojoMagickException; end end mojo_magick-0.6.8/lib/mojo_magick/util/0000755000004100000410000000000014452122120020027 5ustar www-datawww-datamojo_magick-0.6.8/lib/mojo_magick/util/font_parser.rb0000644000004100000410000000212014452122120022671 0ustar www-datawww-data# rubocop:disable Lint/AssignmentInCondition module MojoMagick module Util class FontParser attr_reader :raw_fonts def initialize(raw_fonts) @raw_fonts = raw_fonts end def parse fonts = {} enumerator = raw_fonts.split("\n").each name = nil while begin; line = enumerator.next; rescue StopIteration; line = nil; end line.chomp! line = enumerator.next if line_is_empty(line) m = /^\s*Font:\s+(.*)$/.match(line) if m name = m[1].strip fonts[name] = { name: name } else k, v = extract_key_value(line) fonts[name][k] = v if k && name end end fonts.values.map { |f| MojoMagick::Font.new f } end private def extract_key_value(line) key_val = line.split(":").map(&:strip) [key_val[0].downcase.to_sym, key_val[1]] end def line_is_empty(line) line.nil? || line.empty? || (/^\s+$/ =~ line) end end end end # rubocop:enable Lint/AssignmentInCondition mojo_magick-0.6.8/lib/mojo_magick/util/parser.rb0000644000004100000410000000123414452122120021650 0ustar www-datawww-datarequire_relative "./font_parser" module MojoMagick module Util class Parser attr_reader :raw_fonts def initialize warn "DEPRECATION WARNING: This class has been deprecated and will be removed with " \ "the next minor version release. " \ "Please use `MojoMagick::Util::FontParser` instead" end def parse_fonts(fonts) warn "DEPRECATION WARNING: #{__method__} has been deprecated and will be removed with " \ "the next minor version release. " \ "Please use `MojoMagick::Util::FontParser#parse` instead" FontParser.new(fonts).parse end end end end mojo_magick-0.6.8/lib/mojo_magick/opt_builder.rb0000644000004100000410000000342214452122120021710 0ustar www-datawww-data# Option builder used in #convert and #mogrify helpers. module MojoMagick class OptBuilder def initialize @opts = [] end # Add command-line options with no processing def <<(arg) if arg.is_a?(Array) @opts += arg else @opts << arg end self end # Add files to command line, formatted if necessary def file(*args) @opts << args self end alias files file def label(*args) @opts << "label:#{quoted_arg(args.join)}" end # annotate takes non-standard args def annotate(*args, geometry: 0) @opts << "-annotate" arguments = [args.join] arguments.unshift geometry.to_s @opts << arguments end # Create a temporary file for the given image and add to command line def format(*args) @opts << "-format" @opts << args end def blob(*args) data = args[0] opts = args[1] || {} opts.each do |k, v| send(k.to_s, v.to_s) end tmpfile = MojoMagick.tempfile(data, opts) file tmpfile end def image_block(&block) @opts << '\(' yield block @opts << '\)' self end # Generic commands. Arguments will be formatted if necessary # rubocop:disable Style/MissingRespondToMissing def method_missing(command, *args) @opts << if command.to_s[-1, 1] == "!" "+#{command.to_s.chop}" else "-#{command}" end @opts << args self end # rubocop:enable Style/MissingRespondToMissing def to_a @opts.flatten end protected def quoted_arg(arg) return arg unless /[#'<>^|&();` ]/.match?(arg) ['"', arg.gsub('"', '\"').tr("'", "'"), '"'].join end end end mojo_magick-0.6.8/lib/mojo_magick/commands.rb0000644000004100000410000000157614452122120021211 0ustar www-datawww-datarequire_relative "opt_builder" module MojoMagick class Commands def self.raw_command(*args) execute!(*args) end class << self private def execute(command, *args) execute = "#{command} #{args}" out, outerr, status = Open3.capture3(command, *args.map(&:to_s)) CommandStatus.new execute, out, outerr, status rescue StandardError => e raise MojoError, "#{e.class}: #{e.message}" end def execute!(command, *args) status = execute(command, *args) unless status.success? err_msg = "MojoMagick command failed: #{command}." raise(MojoFailed, "#{err_msg} (Exit status: #{status.exit_code})\n " \ "Command: #{status.command}\n " \ "Error: #{status.error}") end status.return_value end end end end mojo_magick-0.6.8/Gemfile0000644000004100000410000000036714452122120015326 0ustar www-datawww-datasource "https://rubygems.org" group :test, :development do gem "irb", require: false gem "simplecov", require: false gem "bundle-audit" gem "bundler" gem "minitest" gem "rake" gem "rubocop" gem "rubocop-performance" end gemspec mojo_magick-0.6.8/.ruby-version0000644000004100000410000000000614452122120016466 0ustar www-datawww-data2.6.6 mojo_magick-0.6.8/.github/0000755000004100000410000000000014452122120015365 5ustar www-datawww-datamojo_magick-0.6.8/.github/dependabot.yml0000644000004100000410000000022514452122120020214 0ustar www-datawww-dataversion: 2 updates: - package-ecosystem: bundler directory: "/" schedule: interval: monthly time: "13:00" open-pull-requests-limit: 10 mojo_magick-0.6.8/.github/workflows/0000755000004100000410000000000014452122120017422 5ustar www-datawww-datamojo_magick-0.6.8/.github/workflows/ruby.yml0000644000004100000410000000124614452122120021131 0ustar www-datawww-data# This workflow uses actions that are not certified by GitHub. They are # provided by a third-party and are governed by separate terms of service, # privacy policy, and support documentation. # # This workflow will install a prebuilt Ruby version, install dependencies, and # run tests and linters. name: "Ruby CI" on: push: branches: [ '**' ] jobs: ruby-test: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - name: Ruby setup uses: ruby/setup-ruby@v1 with: bundler-cache: true - name: Lint run: bundle exec rubocop - name: Test run: bundle exec rake test mojo_magick-0.6.8/LICENSE.txt0000644000004100000410000000220314452122120015645 0ustar www-datawww-dataMojoMagick is released under the MIT license The MIT License (MIT) Copyright (c) 2013 Jon Rogers, Steve Midgley & Elliott Nelson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.