From eb573626a53b8104e6ea7ec3138098c666426899 Mon Sep 17 00:00:00 2001 From: Joe Da Silva Date: Mon, 16 Sep 2024 21:30:10 -0700 Subject: [PATCH] Added 'make check' and 'make distcheck' fix-ca.c:show_progress == {-1=RUN_NONINTERACTIVE,0=no_display,1=display}. Works with latest gimp-2.99.19 RC1 2024sep16 on commandline. however, 'gimp-2.99 -i' still requests a display, so this is not ready for scripts like rpmbuild or .github/workflows/main.yml yet --- Makefile.am | 2 +- configure.ac | 8 ++- fix-ca.c | 38 ++++++---- po/es.po | 145 +++++++++++++++++++++------------------ po/fr.po | 135 ++++++++++++++++++++---------------- po/gimp30-fix-ca.pot | 138 ++++++++++++++++++++----------------- po/pt.po | 144 ++++++++++++++++++++------------------ rpm/gimp3-fix-ca.spec.in | 9 ++- tests/Makefile.am | 59 ++++++++++++++++ tests/test-fix-ca.c | 2 + tests/test1.md5 | 1 + 11 files changed, 411 insertions(+), 270 deletions(-) create mode 100644 tests/Makefile.am create mode 100644 tests/test-fix-ca.c create mode 100644 tests/test1.md5 diff --git a/Makefile.am b/Makefile.am index d528464..daa746e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ # Makefile.am - Top level automakefile for fix-ca -SUBDIRS = . po +SUBDIRS = . po tests # The braces around ACLOCAL_FLAGS below instead of parentheses are intentional! # Otherwise autoreconf misparses the line. diff --git a/configure.ac b/configure.ac index 6c3649e..ccc9b70 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ dnl Process this file with "autoreconf -i;automake" to produce a configure scrip # Copyright (C) 2024 by Joe Da Silva -AC_PREREQ([2.71]) +AC_PREREQ([2.69]) #-------------------------------------------------------------------------- # Setup variables before running AC_INIT # @@ -51,11 +51,14 @@ AC_PROG_CC AC_PROG_SED AC_PROG_LN_S AC_PROG_MKDIR_P +AC_PATH_PROG([CHMOD],[chmod],[:]) +AC_CHECK_PROGS([GIMP],[gimp-3.0 gimp-2.99],[:]) AC_CHECK_PROGS([GIMPTOOL],[gimptool-3.0 gimptool-2.99],[:]) -AC_PATH_PROG([STRIP],[strip],[:]) +AC_PATH_PROG([MD5SUM],[md5sum],[:]) AC_PATH_PROG([MSGFMT],[msgfmt],[:]) AC_PATH_PROG([MSGINIT],[msginit],[:]) AC_PATH_PROG([MSGMERGE],[msgmerge],[:]) +AC_PATH_PROG([STRIP],[strip],[:]) AC_PATH_PROG([XGETTEXT],[xgettext],[:]) AM_CONFIG_HEADER(fix-ca-config.h) AC_PROG_INSTALL @@ -241,6 +244,7 @@ AH_BOTTOM([ AC_CONFIG_FILES([ Makefile po/Makefile +tests/Makefile rpm/gimp3-fix-ca.spec ]) AC_OUTPUT diff --git a/fix-ca.c b/fix-ca.c index 78c507d..c321a23 100644 --- a/fix-ca.c +++ b/fix-ca.c @@ -35,6 +35,17 @@ #include #endif +#ifdef TEST_FIX_CA +#define PLUG_IN_PROC "test-plug-in-fix-ca" +#define PLUG_IN_ROLE "test-fix-ca" +#define PLUG_IN_BINARY "test-fix-ca" +/* No i18n for now */ +#define _(x) x +#define N_(x) x +#else +#define PLUG_IN_PROC "plug-in-fix-ca" +#define PLUG_IN_ROLE "gimp3-fix-ca" +#define PLUG_IN_BINARY "fix-ca" #ifdef HAVE_GETTEXT #include #define _(String) gettext (String) @@ -48,16 +59,13 @@ #define _(x) x #define N_(x) x #endif +#endif #ifdef DEBUG_TIME # include # include #endif -#define PLUG_IN_PROC "plug-in-fix-ca" -#define PLUG_IN_ROLE "gimp3-fix-ca" -#define PLUG_IN_BINARY "fix-ca" - /* For fixca() row buffer management */ #define SOURCE_ROWS 120 #define INPUT_MAX SOURCE_ROWS/4 @@ -126,7 +134,7 @@ static void fixca_region (FixCaParams *params, gint x2, gint y1, gint y2, - gboolean show_progress); + gint show_progress); static void fixca_help (const gchar *help_id, gpointer help_data); @@ -178,7 +186,7 @@ fixca_create_procedure (GimpPlugIn *plug_in, gimp_procedure_set_image_types (procedure, "RGB*"); gimp_procedure_set_sensitivity_mask (procedure, GIMP_PROCEDURE_SENSITIVE_DRAWABLE); - +#ifndef TEST_FIX_CA #ifdef HAVE_GETTEXT /* Initialize i18n support */ setlocale (LC_ALL, ""); @@ -187,6 +195,7 @@ fixca_create_procedure (GimpPlugIn *plug_in, bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif textdomain (GETTEXT_PACKAGE); +#endif #endif gimp_procedure_set_menu_label (procedure, _("Chromatic Aberration...")); @@ -265,6 +274,7 @@ fixca_run (GimpProcedure *procedure, GError *error = NULL; gint x, y, width, height, sizeImg; +#ifndef TEST_FIX_CA #ifdef HAVE_GETTEXT /* Initialize i18n support */ setlocale(LC_ALL, ""); @@ -273,6 +283,7 @@ fixca_run (GimpProcedure *procedure, bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); #endif textdomain(GETTEXT_PACKAGE); +#endif #endif if (n_drawables != 1) { @@ -440,7 +451,8 @@ fixca_run (GimpProcedure *procedure, shadow = gimp_drawable_get_shadow_buffer(drawable); /* adjust pixel regions from srcImg to destImg, according to params */ - fixca_region (&fix_ca_params, x, (x+width), y, (y+height), TRUE); + fixca_region (&fix_ca_params, x, (x+width), y, (y+height), + ((run_mode == GIMP_RUN_NONINTERACTIVE)? -1:1)); #ifdef DEBUG_TIME printf ("finished doing fixca_region\n"); @@ -612,7 +624,7 @@ preview_update (GtkWidget *widget, GObject *config) params->blueY, params->redY); #endif - fixca_region (params, 0, params->Xsize, y, (y + height), FALSE); + fixca_region (params, 0, params->Xsize, y, (y + height), 0); buffer = g_new (guchar, width * height * params->bpp); b = absolute (params->bpc); @@ -1166,7 +1178,7 @@ centerline(guchar *dest, gint width, gint bpp, gint bpc, static void fixca_region (FixCaParams *params, gint x1, gint x2, gint y1, gint y2, - gboolean show_progress) + gint show_progress) { guchar *srcPTR = params->srcImg; guchar *src[SOURCE_ROWS]; @@ -1189,7 +1201,7 @@ fixca_region (FixCaParams *params, gettimeofday (&tv1, NULL); #endif - if (show_progress) + if (show_progress > 0) gimp_progress_init(_("Shifting pixel components...")); /* Allocate buffers for reading, writing */ @@ -1487,7 +1499,7 @@ fixca_region (FixCaParams *params, } } - if (!show_progress) { + if (show_progress == 0) { if (params->saturation != 0.0) saturate (dest, x2-x1, bytes, bpc, 1+params->saturation/100); @@ -1496,11 +1508,11 @@ fixca_region (FixCaParams *params, set_data (dest, params, x1, y, (x2-x1)); - if (show_progress && ((y-y1) % 8 == 0)) + if (show_progress > 0 && ((y-y1) % 8 == 0)) gimp_progress_update ((gdouble) (y-y1)/(y2-y1)); } - if (show_progress) + if (show_progress > 0) gimp_progress_update (0.0); for (i = 0; i < SOURCE_ROWS; ++i) diff --git a/po/es.po b/po/es.po index e648592..26c5c61 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gimp-fix-ca\n" "Report-Msgid-Bugs-To: https://github.com/JoesCat/gimp3-fix-ca/issues\n" -"POT-Creation-Date: 2024-05-12 16:27-0700\n" +"POT-Creation-Date: 2024-09-04 20:25-0700\n" "PO-Revision-Date: 2024-02-19 23:10-0800\n" "Last-Translator: Jose Da Silva \n" "Language-Team: \n" @@ -17,232 +17,247 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../fix-ca.c:198 +#: ../fix-ca.c:201 #, fuzzy msgid "Chromatic Aberration..." msgstr "Aberración Cromática..." -#: ../fix-ca.c:199 +#: ../fix-ca.c:202 msgid "/Filters/Colors" msgstr "/Filters/Colores" -#: ../fix-ca.c:201 +#: ../fix-ca.c:204 #, fuzzy msgid "Fix Chromatic Aberration" msgstr "Aberración Cromática" -#: ../fix-ca.c:202 +#: ../fix-ca.c:205 #, fuzzy msgid "" "Fix Chromatic Aberration caused by optical lens (eg: analog cameras, " -"adapters).This plugin works by shifting red and bluepixels in the specified " -"amounts." +"adapters). This plugin works by shifting red and blue pixels in the " +"specified amounts." msgstr "" "Corrija la aberración cromática causada por lentes imperfectas. Funciona " "desplazando los componentes rojo y azul de los píxeles de la imagen en las " "cantidades especificadas." -#: ../fix-ca.c:212 +#: ../fix-ca.c:215 #, fuzzy msgid "_Blue-L" msgstr "_Azul-L" -#: ../fix-ca.c:212 +#: ../fix-ca.c:215 msgid "Blue amount (lateral)" msgstr "Movimiento azul (lateral)" -#: ../fix-ca.c:215 +#: ../fix-ca.c:219 #, fuzzy msgid "_Red-L" msgstr "_Rojo-L" -#: ../fix-ca.c:215 +#: ../fix-ca.c:219 msgid "Red amount (lateral)" msgstr "Movimiento rojo (lateral)" -#: ../fix-ca.c:218 +#: ../fix-ca.c:223 #, fuzzy msgid "Lens_X" msgstr "Lente_X" -#: ../fix-ca.c:218 +#: ../fix-ca.c:223 msgid "Lens center X (lateral)" msgstr "Centro de la lente X (lateral)" -#: ../fix-ca.c:221 +#: ../fix-ca.c:227 #, fuzzy msgid "Lens_Y" msgstr "Lente_Y" -#: ../fix-ca.c:221 +#: ../fix-ca.c:227 msgid "Lens center Y (lateral)" msgstr "Centro de la lente Y (lateral)" -#: ../fix-ca.c:224 +#: ../fix-ca.c:231 #, fuzzy msgid "_Interpolation" msgstr "_Interpolación" -#: ../fix-ca.c:225 +#: ../fix-ca.c:232 msgid "Interpolation 0=None/1=Linear/2=Cubic" msgstr "Interpolación 0=Ninguna/1=Lineal/2=Cúbica" -#: ../fix-ca.c:228 +#: ../fix-ca.c:235 msgid "B_lue-X" msgstr "A_zul-X" -#: ../fix-ca.c:228 +#: ../fix-ca.c:236 msgid "Blue amount, X axis (directional)" msgstr "Azul mover eje X (direccional)" -#: ../fix-ca.c:231 +#: ../fix-ca.c:240 msgid "R_ed-X" msgstr "R_ojo-X" -#: ../fix-ca.c:231 +#: ../fix-ca.c:241 msgid "Red amount, X axis (directional)" msgstr "Rojo mover eje X (direccional)" -#: ../fix-ca.c:234 +#: ../fix-ca.c:245 msgid "Bl_ue-Y" msgstr "Az_ul-Y" -#: ../fix-ca.c:234 +#: ../fix-ca.c:246 msgid "Blue amount, Y axis (directional)" msgstr "Azul mover eje Y (direccional)" -#: ../fix-ca.c:237 +#: ../fix-ca.c:250 msgid "Re_d-Y" msgstr "Ro_jo-Y" -#: ../fix-ca.c:237 +#: ../fix-ca.c:251 msgid "Red amount, Y axis (directional)" msgstr "Azul mover eje Y (direccional)" -#: ../fix-ca.c:274 +#: ../fix-ca.c:291 #, c-format msgid "Procedure '%s' only works with one drawable." msgstr "Procedimiento '%s' solo funciona con un elemento dibujable." -#: ../fix-ca.c:285 +#: ../fix-ca.c:302 #, c-format msgid "Procedure '%s' only works with RGB or RGBA." msgstr "Procedimiento '%s' solo funciona con RGB o RGBA." -#: ../fix-ca.c:378 +#: ../fix-ca.c:395 #, c-format msgid "Procedure '%s' cannot use this color precision." msgstr "Procedimiento '%s' no puede utilizar esta precisión de color." -#: ../fix-ca.c:401 +#: ../fix-ca.c:418 #, c-format msgid "Procedure '%s', not enough RAM." msgstr "Procedimiento '%s', no hay suficiente RAM." -#: ../fix-ca.c:669 ../fix-ca.c:762 +#: ../fix-ca.c:686 ../fix-ca.c:780 msgid "Chromatic Aberration" msgstr "Aberración Cromática" -#: ../fix-ca.c:679 ../fix-ca.c:803 -msgid "_None (Fastest)" +#: ../fix-ca.c:696 +#, fuzzy +msgid "None (Fastest)" msgstr "_Ninguno (Más rápido)" -#: ../fix-ca.c:680 ../fix-ca.c:804 -msgid "L_inear" +#: ../fix-ca.c:697 +#, fuzzy +msgid "Linear" msgstr "L_ineales" -#: ../fix-ca.c:681 ../fix-ca.c:805 -msgid "_Cubic (Best)" +#: ../fix-ca.c:698 +#, fuzzy +msgid "Cubic (Best)" msgstr "Cú_bica (Mejor)" -#: ../fix-ca.c:699 ../fix-ca.c:817 +#: ../fix-ca.c:716 ../fix-ca.c:835 msgid "Lateral" msgstr "Lateral" -#: ../fix-ca.c:719 +#: ../fix-ca.c:736 #, fuzzy msgid "Directional" msgstr "Direccional" -#: ../fix-ca.c:766 +#: ../fix-ca.c:784 msgid "_Cancel" msgstr "_Cancelar" -#: ../fix-ca.c:767 +#: ../fix-ca.c:785 msgid "_OK" msgstr "_OK" -#: ../fix-ca.c:787 +#: ../fix-ca.c:805 #, fuzzy msgid "_Saturation:" msgstr "_Saturación:" -#: ../fix-ca.c:791 +#: ../fix-ca.c:809 msgid "Saturate colors in preview window to help you see overlaps" msgstr "Saturar colores en vista previa para ayudarle a ver superposiciones" -#: ../fix-ca.c:809 +#: ../fix-ca.c:821 +msgid "_None (Fastest)" +msgstr "_Ninguno (Más rápido)" + +#: ../fix-ca.c:822 +msgid "L_inear" +msgstr "L_ineales" + +#: ../fix-ca.c:823 +msgid "_Cubic (Best)" +msgstr "Cú_bica (Mejor)" + +#: ../fix-ca.c:827 msgid "Method of how to move Blue and Red Pixels" msgstr "Método de cómo mover píxeles azules y rojos" -#: ../fix-ca.c:819 +#: ../fix-ca.c:837 msgid "Do corrections for lens affected chromatic aberration" msgstr "Hacer correcciones para la aberración cromática afectada por la lente." -#: ../fix-ca.c:824 +#: ../fix-ca.c:842 msgid "_Blue:" msgstr "_Azul:" -#: ../fix-ca.c:836 +#: ../fix-ca.c:854 msgid "_Red:" msgstr "_Rojo:" -#: ../fix-ca.c:848 +#: ../fix-ca.c:866 msgid "Lens_X:" msgstr "Lente_X:" -#: ../fix-ca.c:860 +#: ../fix-ca.c:878 msgid "Lens_Y:" msgstr "Lente_Y:" -#: ../fix-ca.c:872 +#: ../fix-ca.c:890 msgid "Directional, X axis" msgstr "Direccional, eje X" -#: ../fix-ca.c:874 +#: ../fix-ca.c:892 msgid "Do flat directional corrections along the X axis" msgstr "Hacer correcciones direccionales planas en el eje X" -#: ../fix-ca.c:879 +#: ../fix-ca.c:897 #, fuzzy msgid "B_lue:" msgstr "A_zul:" -#: ../fix-ca.c:891 +#: ../fix-ca.c:909 msgid "R_ed:" msgstr "R_ojo:" -#: ../fix-ca.c:903 +#: ../fix-ca.c:921 msgid "Directional, Y axis" msgstr "Direccional, eje Y" -#: ../fix-ca.c:905 +#: ../fix-ca.c:923 msgid "Do flat directional corrections along the Y axis" msgstr "Hacer correcciones direccionales planas en el eje Y" -#: ../fix-ca.c:910 +#: ../fix-ca.c:928 msgid "Bl_ue:" msgstr "Az_ul:" -#: ../fix-ca.c:922 +#: ../fix-ca.c:940 msgid "Re_d:" msgstr "Ro_jo:" -#: ../fix-ca.c:1186 +#: ../fix-ca.c:1204 msgid "Shifting pixel components..." msgstr "Moviendo píxeles..." -#: ../fix-ca.c:1514 +#: ../fix-ca.c:1532 #, fuzzy msgid "" "The image to modify is in RGB format. Color precision can be double, 8, 16, " @@ -263,14 +278,14 @@ msgid "" "last since this is the furthest away from the camera." msgstr "" "La imagen a modificar está en formato RGB. La precisión del color puede ser " -"doble, 8, 16, 32, 64. Los píxeles verdes se mantienen " -"estacionarios ypuede cambiar los colores rojo y azul dentro de un rango de " -"{-30..+30} píxeles.\n" +"doble, 8, 16, 32, 64. Los píxeles verdes se mantienen estacionarios ypuede " +"cambiar los colores rojo y azul dentro de un rango de {-30..+30} píxeles.\n" "\n" -"La aberración cromática lateral se debe a lentes de cámara sin aberración " -"en el centro de la lente y que aumenta gradualmente hacia los bordes de la " -"imagen. Las cámaras digitales pueden corregir esto en el software, las cámaras " -"analógicas o los adaptadores pueden mostrar esto en las fotografías o imágenes " "resultantes.\n" +"La aberración cromática lateral se debe a lentes de cámara sin aberración en " +"el centro de la lente y que aumenta gradualmente hacia los bordes de la " +"imagen. Las cámaras digitales pueden corregir esto en el software, las " +"cámaras analógicas o los adaptadores pueden mostrar esto en las fotografías " +"o imágenes resultantes.\n" "\n" "Las aberraciones direccionales de los ejes X e Y son una cantidad fija de " "aberración debida a la imagen vista a través de algo como vidrio, agua u " diff --git a/po/fr.po b/po/fr.po index a96b360..df14870 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gimp-fix-ca\n" "Report-Msgid-Bugs-To: https://github.com/JoesCat/gimp3-fix-ca/issues\n" -"POT-Creation-Date: 2024-05-12 16:27-0700\n" +"POT-Creation-Date: 2024-09-04 20:25-0700\n" "PO-Revision-Date: 2024-02-19 21:00-0800\n" "Last-Translator: Jose Da Silva \n" "Language-Team: \n" @@ -17,232 +17,249 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../fix-ca.c:198 +#: ../fix-ca.c:201 #, fuzzy msgid "Chromatic Aberration..." msgstr "Aberration Chromatique..." -#: ../fix-ca.c:199 +#: ../fix-ca.c:202 msgid "/Filters/Colors" msgstr "/Filters/Couleur" -#: ../fix-ca.c:201 +#: ../fix-ca.c:204 #, fuzzy msgid "Fix Chromatic Aberration" msgstr "Aberration Chromatique" -#: ../fix-ca.c:202 +#: ../fix-ca.c:205 #, fuzzy msgid "" "Fix Chromatic Aberration caused by optical lens (eg: analog cameras, " -"adapters).This plugin works by shifting red and bluepixels in the specified " -"amounts." +"adapters). This plugin works by shifting red and blue pixels in the " +"specified amounts." msgstr "" "Corrige l'aberration chromatique causée par un objectif imparfait. Il " "fonctionne en décalant les composants rouges et bleus des pixels de l'image " "dans les quantités spécifiées." -#: ../fix-ca.c:212 +#: ../fix-ca.c:215 #, fuzzy msgid "_Blue-L" msgstr "_Bleue-L" -#: ../fix-ca.c:212 +#: ../fix-ca.c:215 msgid "Blue amount (lateral)" msgstr "Mouvement bleue (latéral)" -#: ../fix-ca.c:215 +#: ../fix-ca.c:219 #, fuzzy msgid "_Red-L" msgstr "_Rouge-L" -#: ../fix-ca.c:215 +#: ../fix-ca.c:219 msgid "Red amount (lateral)" msgstr "Mouvement rouge (latéral)" -#: ../fix-ca.c:218 +#: ../fix-ca.c:223 #, fuzzy msgid "Lens_X" msgstr "Lentille_X" -#: ../fix-ca.c:218 +#: ../fix-ca.c:223 msgid "Lens center X (lateral)" msgstr "Centre de la lentille X (latéral)" -#: ../fix-ca.c:221 +#: ../fix-ca.c:227 #, fuzzy msgid "Lens_Y" msgstr "Lentille_Y" -#: ../fix-ca.c:221 +#: ../fix-ca.c:227 msgid "Lens center Y (lateral)" msgstr "Centre de la lentille Y (latéral)" -#: ../fix-ca.c:224 +#: ../fix-ca.c:231 #, fuzzy msgid "_Interpolation" msgstr "_Interpolation" -#: ../fix-ca.c:225 +#: ../fix-ca.c:232 msgid "Interpolation 0=None/1=Linear/2=Cubic" msgstr "Interpolation 0=Aucune/1=Linéaire/2=Cubique" -#: ../fix-ca.c:228 +#: ../fix-ca.c:235 msgid "B_lue-X" msgstr "B_leue-X" -#: ../fix-ca.c:228 +#: ../fix-ca.c:236 msgid "Blue amount, X axis (directional)" msgstr "Quantité de bleue, axe X (directionnel)" -#: ../fix-ca.c:231 +#: ../fix-ca.c:240 msgid "R_ed-X" msgstr "R_ouge-X" -#: ../fix-ca.c:231 +#: ../fix-ca.c:241 msgid "Red amount, X axis (directional)" msgstr "Quantité de rouge, axe X (directionnel)" -#: ../fix-ca.c:234 +#: ../fix-ca.c:245 msgid "Bl_ue-Y" msgstr "Bl_eue-Y" -#: ../fix-ca.c:234 +#: ../fix-ca.c:246 msgid "Blue amount, Y axis (directional)" msgstr "Quantité de bleue, axe Y (directionnel)" -#: ../fix-ca.c:237 +#: ../fix-ca.c:250 msgid "Re_d-Y" msgstr "Ro_uge-Y" -#: ../fix-ca.c:237 +#: ../fix-ca.c:251 msgid "Red amount, Y axis (directional)" msgstr "Quantité de rouge, axe Y (directionnel)" -#: ../fix-ca.c:274 +#: ../fix-ca.c:291 #, c-format msgid "Procedure '%s' only works with one drawable." msgstr "Procédure '%s' ne fonctionne qu'avec RGB ou RGBA." -#: ../fix-ca.c:285 +#: ../fix-ca.c:302 #, c-format msgid "Procedure '%s' only works with RGB or RGBA." msgstr "" -#: ../fix-ca.c:378 +#: ../fix-ca.c:395 #, c-format msgid "Procedure '%s' cannot use this color precision." msgstr "Procédure '%s' ne peut pas utiliser cette précision de couleur." -#: ../fix-ca.c:401 +#: ../fix-ca.c:418 #, c-format msgid "Procedure '%s', not enough RAM." msgstr "Procédure '%s', pas assez de RAM." -#: ../fix-ca.c:669 ../fix-ca.c:762 +#: ../fix-ca.c:686 ../fix-ca.c:780 msgid "Chromatic Aberration" msgstr "Aberration Chromatique" -#: ../fix-ca.c:679 ../fix-ca.c:803 -msgid "_None (Fastest)" +#: ../fix-ca.c:696 +#, fuzzy +msgid "None (Fastest)" msgstr "Aucu_n (Rapide)" -#: ../fix-ca.c:680 ../fix-ca.c:804 -msgid "L_inear" +#: ../fix-ca.c:697 +#, fuzzy +msgid "Linear" msgstr "L_inéaire" -#: ../fix-ca.c:681 ../fix-ca.c:805 -msgid "_Cubic (Best)" +#: ../fix-ca.c:698 +#, fuzzy +msgid "Cubic (Best)" msgstr "_Cubiques (Meilleur)" -#: ../fix-ca.c:699 ../fix-ca.c:817 +#: ../fix-ca.c:716 ../fix-ca.c:835 msgid "Lateral" msgstr "Latérale" -#: ../fix-ca.c:719 +#: ../fix-ca.c:736 #, fuzzy msgid "Directional" msgstr "Directionnel" -#: ../fix-ca.c:766 +#: ../fix-ca.c:784 msgid "_Cancel" msgstr "_Fermer" -#: ../fix-ca.c:767 +#: ../fix-ca.c:785 msgid "_OK" msgstr "_OK" -#: ../fix-ca.c:787 +#: ../fix-ca.c:805 #, fuzzy msgid "_Saturation:" msgstr "Sa_turation:" -#: ../fix-ca.c:791 +#: ../fix-ca.c:809 msgid "Saturate colors in preview window to help you see overlaps" msgstr "Saturez les couleurs pour aider à voir les bords" -#: ../fix-ca.c:809 +#: ../fix-ca.c:821 +msgid "_None (Fastest)" +msgstr "Aucu_n (Rapide)" + +#: ../fix-ca.c:822 +msgid "L_inear" +msgstr "L_inéaire" + +#: ../fix-ca.c:823 +msgid "_Cubic (Best)" +msgstr "_Cubiques (Meilleur)" + +#: ../fix-ca.c:827 msgid "Method of how to move Blue and Red Pixels" msgstr "Méthode de déplacement des pixels bleus et rouges" -#: ../fix-ca.c:819 +#: ../fix-ca.c:837 msgid "Do corrections for lens affected chromatic aberration" -msgstr "Effectuer des corrections pour l'aberration chromatique affectée par la lentille optique" +msgstr "" +"Effectuer des corrections pour l'aberration chromatique affectée par la " +"lentille optique" -#: ../fix-ca.c:824 +#: ../fix-ca.c:842 msgid "_Blue:" msgstr "_Bleue:" -#: ../fix-ca.c:836 +#: ../fix-ca.c:854 msgid "_Red:" msgstr "_Rouge:" -#: ../fix-ca.c:848 +#: ../fix-ca.c:866 msgid "Lens_X:" msgstr "Lentille_X:" -#: ../fix-ca.c:860 +#: ../fix-ca.c:878 msgid "Lens_Y:" msgstr "Lentille_Y:" -#: ../fix-ca.c:872 +#: ../fix-ca.c:890 msgid "Directional, X axis" msgstr "Directionnel, axe X" -#: ../fix-ca.c:874 +#: ../fix-ca.c:892 msgid "Do flat directional corrections along the X axis" msgstr "Effectuer des corrections sur l'axe X" -#: ../fix-ca.c:879 +#: ../fix-ca.c:897 #, fuzzy msgid "B_lue:" msgstr "B_leue:" -#: ../fix-ca.c:891 +#: ../fix-ca.c:909 msgid "R_ed:" msgstr "R_ouge:" -#: ../fix-ca.c:903 +#: ../fix-ca.c:921 msgid "Directional, Y axis" msgstr "Directionnel, axe Y" -#: ../fix-ca.c:905 +#: ../fix-ca.c:923 msgid "Do flat directional corrections along the Y axis" msgstr "Effectuer des corrections sur l'axe Y" -#: ../fix-ca.c:910 +#: ../fix-ca.c:928 msgid "Bl_ue:" msgstr "Bl_eue:" -#: ../fix-ca.c:922 +#: ../fix-ca.c:940 msgid "Re_d:" msgstr "Ro_uge:" -#: ../fix-ca.c:1186 +#: ../fix-ca.c:1204 msgid "Shifting pixel components..." msgstr "Déplacement des pixels..." -#: ../fix-ca.c:1514 +#: ../fix-ca.c:1532 #, fuzzy msgid "" "The image to modify is in RGB format. Color precision can be double, 8, 16, " diff --git a/po/gimp30-fix-ca.pot b/po/gimp30-fix-ca.pot index c06f464..e79f63c 100644 --- a/po/gimp30-fix-ca.pot +++ b/po/gimp30-fix-ca.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/JoesCat/gimp3-fix-ca/issues\n" -"POT-Creation-Date: 2024-05-13 15:46-0700\n" +"POT-Creation-Date: 2024-09-04 20:25-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,218 +17,230 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: ../fix-ca.c:198 +#: ../fix-ca.c:201 msgid "Chromatic Aberration..." msgstr "" -#: ../fix-ca.c:199 +#: ../fix-ca.c:202 msgid "/Filters/Colors" msgstr "" -#: ../fix-ca.c:201 +#: ../fix-ca.c:204 msgid "Fix Chromatic Aberration" msgstr "" -#: ../fix-ca.c:202 +#: ../fix-ca.c:205 msgid "" "Fix Chromatic Aberration caused by optical lens (eg: analog cameras, " -"adapters).This plugin works by shifting red and bluepixels in the specified " -"amounts." +"adapters). This plugin works by shifting red and blue pixels in the " +"specified amounts." msgstr "" -#: ../fix-ca.c:212 -msgid "_Blue" +#: ../fix-ca.c:215 +msgid "_Blue-L" msgstr "" -#: ../fix-ca.c:212 +#: ../fix-ca.c:215 msgid "Blue amount (lateral)" msgstr "" -#: ../fix-ca.c:215 -msgid "_Red" +#: ../fix-ca.c:219 +msgid "_Red-L" msgstr "" -#: ../fix-ca.c:215 +#: ../fix-ca.c:219 msgid "Red amount (lateral)" msgstr "" -#: ../fix-ca.c:218 -msgid "lens_X" +#: ../fix-ca.c:223 +msgid "Lens_X" msgstr "" -#: ../fix-ca.c:218 +#: ../fix-ca.c:223 msgid "Lens center X (lateral)" msgstr "" -#: ../fix-ca.c:221 -msgid "lens_Y" +#: ../fix-ca.c:227 +msgid "Lens_Y" msgstr "" -#: ../fix-ca.c:221 +#: ../fix-ca.c:227 msgid "Lens center Y (lateral)" msgstr "" -#: ../fix-ca.c:224 +#: ../fix-ca.c:231 msgid "_Interpolation" msgstr "" -#: ../fix-ca.c:225 +#: ../fix-ca.c:232 msgid "Interpolation 0=None/1=Linear/2=Cubic" msgstr "" -#: ../fix-ca.c:228 -msgid "X B_lue" +#: ../fix-ca.c:235 +msgid "B_lue-X" msgstr "" -#: ../fix-ca.c:228 +#: ../fix-ca.c:236 msgid "Blue amount, X axis (directional)" msgstr "" -#: ../fix-ca.c:231 -msgid "X R_ed" +#: ../fix-ca.c:240 +msgid "R_ed-X" msgstr "" -#: ../fix-ca.c:231 +#: ../fix-ca.c:241 msgid "Red amount, X axis (directional)" msgstr "" -#: ../fix-ca.c:234 -msgid "Y Bl_ue" +#: ../fix-ca.c:245 +msgid "Bl_ue-Y" msgstr "" -#: ../fix-ca.c:234 +#: ../fix-ca.c:246 msgid "Blue amount, Y axis (directional)" msgstr "" -#: ../fix-ca.c:237 -msgid "Y Re_d" +#: ../fix-ca.c:250 +msgid "Re_d-Y" msgstr "" -#: ../fix-ca.c:237 +#: ../fix-ca.c:251 msgid "Red amount, Y axis (directional)" msgstr "" -#: ../fix-ca.c:274 +#: ../fix-ca.c:291 #, c-format msgid "Procedure '%s' only works with one drawable." msgstr "" -#: ../fix-ca.c:285 +#: ../fix-ca.c:302 #, c-format msgid "Procedure '%s' only works with RGB or RGBA." msgstr "" -#: ../fix-ca.c:378 +#: ../fix-ca.c:395 #, c-format msgid "Procedure '%s' cannot use this color precision." msgstr "" -#: ../fix-ca.c:401 +#: ../fix-ca.c:418 #, c-format msgid "Procedure '%s', not enough RAM." msgstr "" -#: ../fix-ca.c:669 ../fix-ca.c:762 +#: ../fix-ca.c:686 ../fix-ca.c:780 msgid "Chromatic Aberration" msgstr "" -#: ../fix-ca.c:679 ../fix-ca.c:803 +#: ../fix-ca.c:696 msgid "None (Fastest)" msgstr "" -#: ../fix-ca.c:680 ../fix-ca.c:804 +#: ../fix-ca.c:697 msgid "Linear" msgstr "" -#: ../fix-ca.c:681 ../fix-ca.c:805 +#: ../fix-ca.c:698 msgid "Cubic (Best)" msgstr "" -#: ../fix-ca.c:699 ../fix-ca.c:817 +#: ../fix-ca.c:716 ../fix-ca.c:835 msgid "Lateral" msgstr "" -#: ../fix-ca.c:719 +#: ../fix-ca.c:736 msgid "Directional" msgstr "" -#: ../fix-ca.c:766 +#: ../fix-ca.c:784 msgid "_Cancel" msgstr "" -#: ../fix-ca.c:767 +#: ../fix-ca.c:785 msgid "_OK" msgstr "" -#: ../fix-ca.c:787 +#: ../fix-ca.c:805 msgid "_Saturation:" msgstr "" -#: ../fix-ca.c:791 +#: ../fix-ca.c:809 msgid "Saturate colors in preview window to help you see overlaps" msgstr "" -#: ../fix-ca.c:809 +#: ../fix-ca.c:821 +msgid "_None (Fastest)" +msgstr "" + +#: ../fix-ca.c:822 +msgid "L_inear" +msgstr "" + +#: ../fix-ca.c:823 +msgid "_Cubic (Best)" +msgstr "" + +#: ../fix-ca.c:827 msgid "Method of how to move Blue and Red Pixels" msgstr "" -#: ../fix-ca.c:819 +#: ../fix-ca.c:837 msgid "Do corrections for lens affected chromatic aberration" msgstr "" -#: ../fix-ca.c:824 +#: ../fix-ca.c:842 msgid "_Blue:" msgstr "" -#: ../fix-ca.c:836 +#: ../fix-ca.c:854 msgid "_Red:" msgstr "" -#: ../fix-ca.c:848 +#: ../fix-ca.c:866 msgid "Lens_X:" msgstr "" -#: ../fix-ca.c:860 +#: ../fix-ca.c:878 msgid "Lens_Y:" msgstr "" -#: ../fix-ca.c:872 +#: ../fix-ca.c:890 msgid "Directional, X axis" msgstr "" -#: ../fix-ca.c:874 +#: ../fix-ca.c:892 msgid "Do flat directional corrections along the X axis" msgstr "" -#: ../fix-ca.c:879 +#: ../fix-ca.c:897 msgid "B_lue:" msgstr "" -#: ../fix-ca.c:891 +#: ../fix-ca.c:909 msgid "R_ed:" msgstr "" -#: ../fix-ca.c:903 +#: ../fix-ca.c:921 msgid "Directional, Y axis" msgstr "" -#: ../fix-ca.c:905 +#: ../fix-ca.c:923 msgid "Do flat directional corrections along the Y axis" msgstr "" -#: ../fix-ca.c:910 +#: ../fix-ca.c:928 msgid "Bl_ue:" msgstr "" -#: ../fix-ca.c:922 +#: ../fix-ca.c:940 msgid "Re_d:" msgstr "" -#: ../fix-ca.c:1186 +#: ../fix-ca.c:1204 msgid "Shifting pixel components..." msgstr "" -#: ../fix-ca.c:1514 +#: ../fix-ca.c:1532 msgid "" "The image to modify is in RGB format. Color precision can be double, 8, 16, " "32 or 64. The green pixels are kept stationary, and you can shift red and " diff --git a/po/pt.po b/po/pt.po index 0dd5f43..e9030bd 100644 --- a/po/pt.po +++ b/po/pt.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gimp-fix-ca\n" "Report-Msgid-Bugs-To: https://github.com/JoesCat/gimp3-fix-ca/issues\n" -"POT-Creation-Date: 2024-05-12 16:27-0700\n" +"POT-Creation-Date: 2024-09-04 20:25-0700\n" "PO-Revision-Date: 2024-02-17 17:24-0800\n" "Last-Translator: Jose Da Silva \n" "Language-Team: \n" @@ -17,231 +17,246 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../fix-ca.c:198 +#: ../fix-ca.c:201 #, fuzzy msgid "Chromatic Aberration..." msgstr "Aberração Cromática..." -#: ../fix-ca.c:199 +#: ../fix-ca.c:202 msgid "/Filters/Colors" msgstr "/Filters/Cors" -#: ../fix-ca.c:201 +#: ../fix-ca.c:204 #, fuzzy msgid "Fix Chromatic Aberration" msgstr "Aberração Cromática" -#: ../fix-ca.c:202 +#: ../fix-ca.c:205 #, fuzzy msgid "" "Fix Chromatic Aberration caused by optical lens (eg: analog cameras, " -"adapters).This plugin works by shifting red and bluepixels in the specified " -"amounts." +"adapters). This plugin works by shifting red and blue pixels in the " +"specified amounts." msgstr "" "Corrija a aberração cromática causada por lentes imperfeitas. Funciona " "movendo pixels vermelhos e azuis na imagem." -#: ../fix-ca.c:212 +#: ../fix-ca.c:215 #, fuzzy msgid "_Blue-L" msgstr "_Azul-L" -#: ../fix-ca.c:212 +#: ../fix-ca.c:215 msgid "Blue amount (lateral)" msgstr "Movimento azul (lateral)" -#: ../fix-ca.c:215 +#: ../fix-ca.c:219 #, fuzzy msgid "_Red-L" msgstr "_Vermelho-L" -#: ../fix-ca.c:215 +#: ../fix-ca.c:219 msgid "Red amount (lateral)" msgstr "Movimento vermelho (lateral)" -#: ../fix-ca.c:218 +#: ../fix-ca.c:223 #, fuzzy msgid "Lens_X" msgstr "Lente_X" -#: ../fix-ca.c:218 +#: ../fix-ca.c:223 msgid "Lens center X (lateral)" msgstr "Centro da lente X (lateral)" -#: ../fix-ca.c:221 +#: ../fix-ca.c:227 #, fuzzy msgid "Lens_Y" msgstr "Lente_Y" -#: ../fix-ca.c:221 +#: ../fix-ca.c:227 msgid "Lens center Y (lateral)" msgstr "Centro da lente Y (lateral)" -#: ../fix-ca.c:224 +#: ../fix-ca.c:231 #, fuzzy msgid "_Interpolation" msgstr "_Interpolação" -#: ../fix-ca.c:225 +#: ../fix-ca.c:232 msgid "Interpolation 0=None/1=Linear/2=Cubic" msgstr "Interpolação 0=Nenhum/1=Linear/2=Cúbico" -#: ../fix-ca.c:228 +#: ../fix-ca.c:235 msgid "B_lue-X" msgstr "A_zul-X" -#: ../fix-ca.c:228 +#: ../fix-ca.c:236 msgid "Blue amount, X axis (directional)" msgstr "Quantidade de azul, eixo X (direcional)" -#: ../fix-ca.c:231 +#: ../fix-ca.c:240 msgid "R_ed-X" msgstr "V_ermelho-X" -#: ../fix-ca.c:231 +#: ../fix-ca.c:241 msgid "Red amount, X axis (directional)" msgstr "Quantidade de vermelho, eixo X (direcional)" -#: ../fix-ca.c:234 +#: ../fix-ca.c:245 msgid "Bl_ue-Y" msgstr "Az_ul-Y" -#: ../fix-ca.c:234 +#: ../fix-ca.c:246 msgid "Blue amount, Y axis (directional)" msgstr "Quantidade de azul, eixo Y (direcional)" -#: ../fix-ca.c:237 +#: ../fix-ca.c:250 msgid "Re_d-Y" msgstr "Ve_rmelho-Y" -#: ../fix-ca.c:237 +#: ../fix-ca.c:251 msgid "Red amount, Y axis (directional)" msgstr "Quantidade de vermelho, eixo Y (direcional)" -#: ../fix-ca.c:274 +#: ../fix-ca.c:291 #, c-format msgid "Procedure '%s' only works with one drawable." msgstr "Procedimento '%s' só funciona com um drawable." -#: ../fix-ca.c:285 +#: ../fix-ca.c:302 #, c-format msgid "Procedure '%s' only works with RGB or RGBA." msgstr "Procedimento '%s' só funciona com RGB ou RGBA." -#: ../fix-ca.c:378 +#: ../fix-ca.c:395 #, c-format msgid "Procedure '%s' cannot use this color precision." msgstr "Procedimento '%s' não pode usar esta precisão de cor." -#: ../fix-ca.c:401 +#: ../fix-ca.c:418 #, c-format msgid "Procedure '%s', not enough RAM." msgstr "Procedimento '%s', RAM insuficiente." -#: ../fix-ca.c:669 ../fix-ca.c:762 +#: ../fix-ca.c:686 ../fix-ca.c:780 msgid "Chromatic Aberration" msgstr "Aberração Cromática" -#: ../fix-ca.c:679 ../fix-ca.c:803 -msgid "_None (Fastest)" +#: ../fix-ca.c:696 +#, fuzzy +msgid "None (Fastest)" msgstr "_Nenhum (Rápido)" -#: ../fix-ca.c:680 ../fix-ca.c:804 -msgid "L_inear" +#: ../fix-ca.c:697 +#, fuzzy +msgid "Linear" msgstr "L_inear" -#: ../fix-ca.c:681 ../fix-ca.c:805 -msgid "_Cubic (Best)" +#: ../fix-ca.c:698 +#, fuzzy +msgid "Cubic (Best)" msgstr "_Cúbico (Melhor)" -#: ../fix-ca.c:699 ../fix-ca.c:817 +#: ../fix-ca.c:716 ../fix-ca.c:835 msgid "Lateral" msgstr "Lateral" -#: ../fix-ca.c:719 +#: ../fix-ca.c:736 #, fuzzy msgid "Directional" msgstr "Direcional" -#: ../fix-ca.c:766 +#: ../fix-ca.c:784 msgid "_Cancel" msgstr "_Fechar" -#: ../fix-ca.c:767 +#: ../fix-ca.c:785 msgid "_OK" msgstr "_OK" -#: ../fix-ca.c:787 +#: ../fix-ca.c:805 #, fuzzy msgid "_Saturation:" msgstr "_Saturação:" -#: ../fix-ca.c:791 +#: ../fix-ca.c:809 msgid "Saturate colors in preview window to help you see overlaps" msgstr "Sature as cores para ajudá-lo a ver as bordas" -#: ../fix-ca.c:809 +#: ../fix-ca.c:821 +msgid "_None (Fastest)" +msgstr "_Nenhum (Rápido)" + +#: ../fix-ca.c:822 +msgid "L_inear" +msgstr "L_inear" + +#: ../fix-ca.c:823 +msgid "_Cubic (Best)" +msgstr "_Cúbico (Melhor)" + +#: ../fix-ca.c:827 msgid "Method of how to move Blue and Red Pixels" msgstr "Método de mover pixels azuis e vermelhos" -#: ../fix-ca.c:819 +#: ../fix-ca.c:837 msgid "Do corrections for lens affected chromatic aberration" msgstr "Faça correções para a aberração cromática afetada pela lente" -#: ../fix-ca.c:824 +#: ../fix-ca.c:842 msgid "_Blue:" msgstr "_Azul:" -#: ../fix-ca.c:836 +#: ../fix-ca.c:854 msgid "_Red:" msgstr "_Vermelho:" -#: ../fix-ca.c:848 +#: ../fix-ca.c:866 msgid "Lens_X:" msgstr "Lente_X:" -#: ../fix-ca.c:860 +#: ../fix-ca.c:878 msgid "Lens_Y:" msgstr "Lente_Y:" -#: ../fix-ca.c:872 +#: ../fix-ca.c:890 msgid "Directional, X axis" msgstr "Direcional, eixo X" -#: ../fix-ca.c:874 +#: ../fix-ca.c:892 msgid "Do flat directional corrections along the X axis" msgstr "Faça correções direcionais no eixo X" -#: ../fix-ca.c:879 +#: ../fix-ca.c:897 #, fuzzy msgid "B_lue:" msgstr "A_zul:" -#: ../fix-ca.c:891 +#: ../fix-ca.c:909 msgid "R_ed:" msgstr "V_ermelho:" -#: ../fix-ca.c:903 +#: ../fix-ca.c:921 msgid "Directional, Y axis" msgstr "Direcional, eixo Y" -#: ../fix-ca.c:905 +#: ../fix-ca.c:923 msgid "Do flat directional corrections along the Y axis" msgstr "Faça correções direcionais no eixo Y" -#: ../fix-ca.c:910 +#: ../fix-ca.c:928 msgid "Bl_ue:" msgstr "Az_ul:" -#: ../fix-ca.c:922 +#: ../fix-ca.c:940 msgid "Re_d:" msgstr "Ve_rmelho:" -#: ../fix-ca.c:1186 +#: ../fix-ca.c:1204 msgid "Shifting pixel components..." msgstr "Mudando pixels de cor..." -#: ../fix-ca.c:1514 +#: ../fix-ca.c:1532 #, fuzzy msgid "" "The image to modify is in RGB format. Color precision can be double, 8, 16, " @@ -261,15 +276,14 @@ msgid "" "closest to the film or image sensor, and directional corrections applied " "last since this is the furthest away from the camera." msgstr "" -"A imagem a modificar está no formato RGB. A precisão da cor pode ser " -"dupla, 8, 16, 32, 64. Os pixels verdes são mantidos estacionários " -"e você pode mudar as cores vermelha e azul dentro de um intervalo de {-30.." -"+30} pixels.\n" +"A imagem a modificar está no formato RGB. A precisão da cor pode ser dupla, " +"8, 16, 32, 64. Os pixels verdes são mantidos estacionários e você pode mudar " +"as cores vermelha e azul dentro de um intervalo de {-30..+30} pixels.\n" "\n" "A Aberração Cromática Lateral é devida a lentes de câmera sem aberração no " -"centro da lente e aumentando gradualmente em direção às bordas da imagem. " -"As câmeras digitais podem corrigir isso no software, as câmeras analógicas " -"ou os adaptadores podem mostrar isso nas fotos ou imagens resultantes.\n" +"centro da lente e aumentando gradualmente em direção às bordas da imagem. As " +"câmeras digitais podem corrigir isso no software, as câmeras analógicas ou " +"os adaptadores podem mostrar isso nas fotos ou imagens resultantes.\n" "\n" "As aberrações direcionais dos eixos X e Y são uma quantidade fixa de " "aberração devido à imagem vista através de algo como vidro, água ou outro " diff --git a/rpm/gimp3-fix-ca.spec.in b/rpm/gimp3-fix-ca.spec.in index 7c48280..6cca8c5 100644 --- a/rpm/gimp3-fix-ca.spec.in +++ b/rpm/gimp3-fix-ca.spec.in @@ -19,9 +19,11 @@ BuildRequires: gcc BuildRequires: make BuildRequires: gettext-devel BuildRequires: pkgconfig(gtk+-3.0) -BuildRequires: pkgconfig(gimp3) +#BuildRequires: pkgconfig(gimp3) +#BuildRequires: pkgconfig(gimp3-devel) +#BuildRequires: pkgconfig(gimp3-libs) -Requires: gimp3 +#Requires: gimp3 %description @@ -39,6 +41,9 @@ autoreconf --force --install --verbose %configure %make_build +%check +make check + %install %make_install INSTALLDIR="%{buildroot}/%{plugindir}" \ diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..e340eeb --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,59 @@ +AM_CFLAGS = ${CFLAGS} ${CPPFLAGS} ${GIMP_CFLAGS} ${GTK_CFLAGS} ${WCFLAGS} ${FCA_CFLAGS} -I${top_srcdir} -I${top_builddir} + +AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} ${GIMP_CFLAGS} -I${includedir} + +EXTRA_DIST = test-fix-ca.c test1.md5 + +noinst_PROGRAMS = test-fix-ca +test_fix_ca_name = test-fix-ca +test_fix_ca_SOURCES = test-fix-ca.c +test_fix_ca.$(OBJEXT): fix-ca-config.h +test_fix_ca_LDADD = ${LIBS} ${GIMP_LIBS} ${GTK_LIBS} ${WSLIB} ${FCA_LIB} + +update-scm1: + echo "(define (test-fix-ca-scm)" > ${builddir}/test-fix-ca.scm; \ + echo " (let* (" >> ${builddir}/test-fix-ca.scm; \ + echo " (image (car (gimp-file-load RUN-NONINTERACTIVE \"${top_srcdir}/img-fix-ca/full-branches.jpg\")))" >> ${builddir}/test-fix-ca.scm; \ + echo " (drawable (car (gimp-image-get-active-layer image)))" >> ${builddir}/test-fix-ca.scm; \ + echo " (drawables (vector drawable))" >> ${builddir}/test-fix-ca.scm; \ + echo " )" >> ${builddir}/test-fix-ca.scm; \ + echo " (test-plug-in-fix-ca RUN-NONINTERACTIVE image 1 drawables 6.0 -2.4 658 1280 1 0 0 0 0)" >> ${builddir}/test-fix-ca.scm; \ + echo " (gimp-file-save RUN-NONINTERACTIVE image \"${builddir}/test1.bmp\" ())" >> ${builddir}/test-fix-ca.scm; \ + echo " (gimp-image-delete image)" >> ${builddir}/test-fix-ca.scm; \ + echo " )" >> ${builddir}/test-fix-ca.scm; \ + echo ")" >> ${builddir}/test-fix-ca.scm; \ + echo "" >> ${builddir}/test-fix-ca.scm; \ + echo "(script-fu-register \"test-fix-ca-scm\"" >> ${builddir}/test-fix-ca.scm; \ + echo " _\"_test-fix-ca-scm...\"" >> ${builddir}/test-fix-ca.scm; \ + echo " _\"Simple script to load an image, modify it, and save the resulting image. This uses the test version of gimp3-Fix-CA (called test-plug-in-fix-ca).\"" >> ${builddir}/test-fix-ca.scm; \ + echo " \"Jose Da Silva\"" >> ${builddir}/test-fix-ca.scm; \ + echo " \"Jose Da Silva\"" >> ${builddir}/test-fix-ca.scm; \ + echo " \"2024"\" >> ${builddir}/test-fix-ca.scm; \ + echo " \"RGB*"\" >> ${builddir}/test-fix-ca.scm; \ + echo ")" >> ${builddir}/test-fix-ca.scm; \ + echo "" >> ${builddir}/test-fix-ca.scm; \ + echo "(script-fu-menu-register \"test-fix-ca-scm\"" >> ${builddir}/test-fix-ca.scm; \ + echo " \"/Filters/Colors\")" >> ${builddir}/test-fix-ca.scm; \ + echo "" >> ${builddir}/test-fix-ca.scm + +update-test1: + echo "#!/bin/sh" > ${builddir}/test1.sh; \ + echo "rm -f ${builddir}/test1.bmp" >> ${builddir}/test1.sh; \ + echo "${GIMPTOOL} --install-script ${builddir}/test-fix-ca.scm" >> ${builddir}/test1.sh; \ + echo "${GIMPTOOL} --install-bin ${builddir}/test-fix-ca" >> ${builddir}/test1.sh; \ + echo "${GIMP} --verbose --console-messages -i --batch-interpreter plug-in-script-fu-eval -b '(test-fix-ca-scm RUN-NONINTERACTIVE)' -b '(gimp-quit 0)'" >> ${builddir}/test1.sh; \ + echo "${GIMPTOOL} --uninstall-bin test-fix-ca" >> ${builddir}/test1.sh; \ + echo "${GIMPTOOL} --uninstall-script test-fix-ca.scm" >> ${builddir}/test1.sh; \ + echo "${MD5SUM} -c ${top_srcdir}/tests/test1.md5" >> ${builddir}/test1.sh; \ + ${CHMOD} +x ${builddir}/test1.sh + +TESTS = ${builddir}/test1.sh + +test1.sh: + make update-scm1; \ + make update-test1 + +clean-local: + rm -f ${builddir}/test?.sh ${builddir}/test?.bmp ${builddir}/test*.scm + +.PHONY: update-scm1 update-test1 diff --git a/tests/test-fix-ca.c b/tests/test-fix-ca.c new file mode 100644 index 0000000..c3e1a9b --- /dev/null +++ b/tests/test-fix-ca.c @@ -0,0 +1,2 @@ +#define TEST_FIX_CA 1 +#include "../fix-ca.c" diff --git a/tests/test1.md5 b/tests/test1.md5 new file mode 100644 index 0000000..3ebed0a --- /dev/null +++ b/tests/test1.md5 @@ -0,0 +1 @@ +0409583edc1fae3e66f1cd90b6c3a2dc test1.bmp