Traitement d’images avec g’mic 3.0

Il y a quelques temps j’avais présenté brièvement dans un précédent post Darktable, c’est un outil particulièrement puissant pour traiter les photos en mode raw et qui n’a rien à envier à des outils comme Lightroom d’Adobe. En contrepartie, ce n’est pas un outil facile qui demande de l’investissement avant de pouvoir bien l’exploiter. Il existe des solutions un peu plus simples et moins puissantes mais qui seront suffisantes la plupart du temps quand on n’est pas trop difficile. C’est le cas de G’MIC qui s’interface avec GIMP avec G’MIC-Qt.

G’MIC

Un article récent sur linuxfr présente assez bien cet outil et les nouveautés qu’apportent la nouvelle version. G’MIC est disponible dans la plupart des distributions récentes, mais dans le cas où une installation via les sources vous intéresse pour pouvoir bénéficier de la dernière version, voici les étapes à suivre.

On récupèrera les sources par ici et on tapera ensuite les commandes suivantes :

tar xvfz gmic_3.0.2.tar.gz
cd gmic-3.0.2
mkdir build
cd build
cmake .. -DENABLE_OPENCV=ON

Voilà une partie du résultat

-- Checking for module 'fftw3>=3.0'
--   Found fftw3, version 3.3.9
-- Found Fftw: fftw3  
-- Checking for module 'opencv4'
--   Found opencv4, version 4.5.4
-- Found OpenCV: opencv_gapi;opencv_stitching;opencv_alphamat;opencv_aruco;opencv_barcode;opencv_bgsegm;opencv_bioinspired;opencv_ccalib;opencv_dnn_objdetect;opencv_dnn_superres;opencv_dpm;opencv_face;opencv_freetype;opencv_fuzzy;opencv_hdf;opencv_hfs;opencv_img_hash;opencv_intensity_transform;opencv_line_descriptor;opencv_mcc;opencv_quality;opencv_rapid;opencv_reg;opencv_rgbd;opencv_saliency;opencv_stereo;opencv_structured_light;opencv_phase_unwrapping;opencv_superres;opencv_optflow;opencv_surface_matching;opencv_tracking;opencv_highgui;opencv_datasets;opencv_text;opencv_plot;opencv_videostab;opencv_videoio;opencv_wechat_qrcode;opencv_xfeatures2d;opencv_shape;opencv_ml;opencv_ximgproc;opencv_video;opencv_xobjdetect;opencv_objdetect;opencv_calib3d;opencv_imgcodecs;opencv_features2d;opencv_dnn;opencv_flann;opencv_xphoto;opencv_photo;opencv_imgproc;opencv_core  
-- Checking for module 'GraphicsMagick++'
--   Found GraphicsMagick++, version 1.3.36
-- Found GraphicsMagick: GraphicsMagick++;GraphicsMagick  
-- Found TIFF: /usr/lib64/libtiff.so (found version "4.2.0")  
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.37") 
-- Found JPEG: /usr/lib64/libjpeg.so (found version "80") 
-- Checking for module 'OpenEXR'
--   Found OpenEXR, version 2.5.7
-- Found OpenEXR: IlmImf-2_5;Imath-2_5;Half-2_5;Iex-2_5;IexMath-2_5;IlmThread-2_5  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found GMicStdlib: /usr/local/linux/photos/gmic-3.0.2/src/gmic_stdlib.h  
-- The following OPTIONAL packages have been found:

 * OpenMP
 * CURL
 * X11
 * Fftw
 * OpenCV
 * GraphicsMagick
 * TIFF
 * ZLIB
 * PNG
 * JPEG
 * PkgConfig
 * OpenEXR
 * Threads

-- The following REQUIRED packages have been found:

 * CImg
 * GMicStdlib

-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/linux/photos/gmic-3.0.2/build

On tape ensuite make et en tant que root make install. Ce n’est pas fini, on récupère G’MIC-Qt par là, on installera préalablement les sources de gimp (urpmi gimp-devel sur ma mageia) et on exécute les commandes suivantes :

tar xvfz gmic-qt-v.3.0.0.tar.gz
gmic-qt-v.3.0.0
mkdir build
cd build
cmake .. -DGMIC_LIB_PATH=/usr/local/lib64 -DGMIC_PATH=/usr/local/linux/photos/gmic-3.0.2/src

Pour la dernière commande on indiquera le chemin absolu de G’MIC. Voilà le résultat:

Build type is Release
Building for target host application: gimp
G'MIC path: /usr/local/linux/photos/gmic-3.0.2/src
Found G'MIC repository
Found /usr/local/linux/photos/gmic-3.0.2/src/CImg.h
Found /usr/local/linux/photos/gmic-3.0.2/src/gmic_stdlib_community.h
CImg version is [300]
G'MIC version is [300]
-- Found FFTW3_CORE 
-- FFTW core Found Libraries: /usr/lib64/libfftw3.so
-- Found FFTW3_THREADS 
-- FFTW threads Found Libraries: /usr/lib64/libfftw3_threads.so
G'Mic: using OpenMP
Link Time Optimizer enabled
-- Checking for module 'gimp-2.0'
--   Found gimp-2.0, version 2.10.24
-- The following OPTIONAL packages have been found:

 * CURL
 * OpenMP, A low-level parallel execution library, <http://openmp.org/wp/>
   Optionally used by gmic-qt
 * X11

-- The following REQUIRED packages have been found:

 * Qt5Core
 * Qt5Gui
 * Qt5Widgets
 * Qt5Network
 * Qt5 (required version >= 5.2.0)
 * Qt5LinguistTools
 * PNG
 * ZLIB
 * FFTW3
 * PkgConfig

-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/linux/photos/gmic-qt-v.3.0.0/build

On tape ensuite make et en tant que root make install. En lançant Gimp, G’MIC fait son apparition au niveau du menu Filtres.

Laisser un commentaire