]> granicus.if.org Git - imagemagick/commitdiff
Support trim:background-color define for -trim option
authorCristy <urban-warrior@imagemagick.org>
Sun, 13 Oct 2019 00:53:38 +0000 (20:53 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 13 Oct 2019 00:53:38 +0000 (20:53 -0400)
ChangeLog
MagickCore/attribute.c

index 2a20eaa6128073510c9bba03f7f71f240bb1f24a..e341196f3127930f9ff9e31dc92d67b27f57cce0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
 2019-10-06  7.0.8-69 Cristy  <quetzlzacatenango@image...>
   * Fixed numerous issues  posted to GitHub (reference
     https://github.com/ImageMagick/ImageMagick/issues).
+  * Support trim:background-color define for -trim option.
 
 2019-10-05  7.0.8-68 Cristy  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.8-68, GIT revision 16184:b75b0e5:20191005.
index 8c4c1984d17d8ab11b769959a86530bdc843984d..44896f01b5f0c306dae479fc1f8d31aed509de51 100644 (file)
@@ -141,6 +141,9 @@ static double GetEdgeBackgroundFactor(const Image *image,
   CacheView
     *edge_view;
 
+  const char
+    *artifact;
+
   double
     factor;
 
@@ -195,6 +198,9 @@ static double GetEdgeBackgroundFactor(const Image *image,
     }
   }
   GetPixelInfoPixel(image,p,&background);
+  artifact=GetImageArtifact(image,"trim:background-color");
+  if (artifact != (const char *) NULL)
+    (void) QueryColorCompliance(artifact,AllCompliance,&background,exception);
   edge_geometry.width=width;
   edge_geometry.height=height;
   edge_geometry.x=x_offset;