Fixing some warnings related to imagemagick.

This commit is contained in:
Sergiotarxz 2024-10-30 02:58:38 +01:00
parent b817a9bb25
commit b6dfefefd8
5 changed files with 17 additions and 6 deletions

View File

@ -74,7 +74,7 @@ sub print($self) {
my $out = $tempdir->child('out.bmp'); my $out = $tempdir->child('out.bmp');
$self->current_image->_file( '' . $in ); $self->current_image->_file( '' . $in );
die 'Couldn\'t invert image' 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; $out;
open my $fh, '<', $out; open my $fh, '<', $out;
$self->_send_command( $self->_send_command(

View File

@ -32,7 +32,7 @@ use JSON;
use Net::DBus; use Net::DBus;
use Inline C => 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" #include "glib-2.0/gio/gio.h"
void void
@ -142,8 +142,6 @@ sub start($self) {
$self->_startup; $self->_startup;
} }
); );
my $file = Glib::IO::File::new_for_path('hola');
print Data::Dumper::Dumper $file;
$app->signal_connect( $app->signal_connect(
open => sub( $app, $files, $n_files, $hint ) { open => sub( $app, $files, $n_files, $hint ) {
if ( $n_files > 0 ) { if ( $n_files > 0 ) {

View File

@ -119,7 +119,7 @@ sub print($self) {
my $image_file_out = $tempdir->child('out.png'); my $image_file_out = $tempdir->child('out.png');
die 'Cannot convert' die 'Cannot convert'
if system( if system(
qw/convert/, qw/magick/,
$image_file_in, $image_file_in,
qw/-resize 384x -brightness-contrast +0.8 -dither FloydSteinberg -remap pattern:gray50/, qw/-resize 384x -brightness-contrast +0.8 -dither FloydSteinberg -remap pattern:gray50/,
$image_file_out $image_file_out

View File

@ -12,7 +12,7 @@ sub get_gd_image($file) {
my $tempdir = Path::Tiny->tempdir; my $tempdir = Path::Tiny->tempdir;
my $new_image = $tempdir->child( 'image.' . $extension ); my $new_image = $tempdir->child( 'image.' . $extension );
die 'Could not use the convert command' 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; $new_image;
$file = $new_image; $file = $new_image;
my $image; my $image;

View File

@ -8,9 +8,22 @@ finish-args:
- --socket=fallback-x11 - --socket=fallback-x11
- --socket=wayland - --socket=wayland
- --share=network - --share=network
- --allow=bluetooth
- --socket=system-bus
command: hiperthermia command: hiperthermia
modules: modules:
- name: 'imagemagick' - 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: sources:
- type: "git" - type: "git"
url: 'https://github.com/libgd/libgd' url: 'https://github.com/libgd/libgd'