diff --git a/lib/Exd/DeviceToCatPrinter.pm b/lib/Exd/DeviceToCatPrinter.pm index e55a711..b588cbe 100644 --- a/lib/Exd/DeviceToCatPrinter.pm +++ b/lib/Exd/DeviceToCatPrinter.pm @@ -74,7 +74,7 @@ sub print($self) { my $out = $tempdir->child('out.bmp'); $self->current_image->_file( '' . $in ); die 'Couldn\'t invert image' - if system qw/convert -flop -rotate 180/, $in, qw/-negate -monochrome/, + if system qw/magick/, $in, qw/-flop -rotate 180 -negate -monochrome/, $out; open my $fh, '<', $out; $self->_send_command( diff --git a/lib/Exd/Gui.pm b/lib/Exd/Gui.pm index e99722e..b66f06e 100644 --- a/lib/Exd/Gui.pm +++ b/lib/Exd/Gui.pm @@ -32,7 +32,7 @@ use JSON; use Net::DBus; use Inline C => - <<'EOF' => LIBS => '', ccflags => '-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/sysprof-6 -pthread'; + <<'EOF' => LIBS => '', ccflags => (`pkg-config --cflags gio-2.0` || '-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/sysprof-6 -pthread'); #include "glib-2.0/gio/gio.h" void @@ -142,8 +142,6 @@ sub start($self) { $self->_startup; } ); - my $file = Glib::IO::File::new_for_path('hola'); - print Data::Dumper::Dumper $file; $app->signal_connect( open => sub( $app, $files, $n_files, $hint ) { if ( $n_files > 0 ) { diff --git a/lib/Exd/Printer.pm b/lib/Exd/Printer.pm index b937047..78b856b 100644 --- a/lib/Exd/Printer.pm +++ b/lib/Exd/Printer.pm @@ -119,7 +119,7 @@ sub print($self) { my $image_file_out = $tempdir->child('out.png'); die 'Cannot convert' if system( - qw/convert/, + qw/magick/, $image_file_in, qw/-resize 384x -brightness-contrast +0.8 -dither FloydSteinberg -remap pattern:gray50/, $image_file_out diff --git a/lib/Exd/Utils.pm b/lib/Exd/Utils.pm index 85bffdb..7bb8c3e 100644 --- a/lib/Exd/Utils.pm +++ b/lib/Exd/Utils.pm @@ -12,7 +12,7 @@ sub get_gd_image($file) { my $tempdir = Path::Tiny->tempdir; my $new_image = $tempdir->child( 'image.' . $extension ); die 'Could not use the convert command' - if system 'convert', $file, '-background', 'white', '-alpha', 'remove', + if system 'magick', $file, '-background', 'white', '-alpha', 'remove', $new_image; $file = $new_image; my $image; diff --git a/me.sergiotarxz.Exd.yml b/me.sergiotarxz.Exd.yml index 8dff316..656acc0 100644 --- a/me.sergiotarxz.Exd.yml +++ b/me.sergiotarxz.Exd.yml @@ -8,9 +8,22 @@ finish-args: - --socket=fallback-x11 - --socket=wayland - --share=network + - --allow=bluetooth + - --socket=system-bus command: hiperthermia modules: - name: 'imagemagick' + sources: + - type: 'git' + url: 'https://github.com/ImageMagick/ImageMagick' + commit: '5fb1f0f0fca16dabf604fdd07c9c935213b0074d' + config-opts: + - --enable-shared + - --disable-static + - --disable-docs + - --with-modules + - --with-threads + - name: 'gd' sources: - type: "git" url: 'https://github.com/libgd/libgd'