Skip to content

Commit b025ef1

Browse files
committed
utils: icon_generator
1 parent e6eabf4 commit b025ef1

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/utils/icon_generator.cr

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,18 @@ module MoonScript
2222
extend self
2323

2424
def convert(image, size)
25-
output = IO::Memory.new
26-
error = IO::Memory.new
25+
output =
26+
IO::Memory.new
2727

28-
if status_succes?
28+
error =
29+
IO::Memory.new
30+
31+
status =
32+
Process.run(
33+
"convert #{image} -resize #{size}x#{size} -",
34+
shell: true, error: error, output: output)
35+
36+
if status.success?
2937
output.to_s
3038
else
3139
""

0 commit comments

Comments
 (0)