]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 16 Oct 2010 00:55:07 +0000 (00:55 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 16 Oct 2010 00:55:07 +0000 (00:55 +0000)
magick/resize.c

index 23efed8384f9bed644171b60ac9d15571efab547..898fe7dc2c2e64c53aeaee6086c41b829584fdbd 100644 (file)
@@ -1028,70 +1028,62 @@ MagickExport ResizeFilter *AcquireResizeFilter(const Image *image,
   /*
     Expert Option Request for verbose details of the resulting filter.
   */
-#if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp single
-  {
-#endif
-    artifact=GetImageArtifact(image,"filter:verbose");
-    if (artifact != (const char *) NULL)
-      {
-        double
-          support,
-          x;
+  artifact=GetImageArtifact(image,"filter:verbose");
+  if ((artifact != (const char *) NULL) && (GetOpenMPThreadId() == 0))
+    {
+      double
+        support,
+        x;
 
-        /*
-          Set the weighting function properly when the weighting
-          function may not exactly match the filter of the same name.
-          EG: a Point filter really uses a Box weighting function
-          with a different support than is typically used.
+      /*
+        Set the weighting function properly when the weighting
+        function may not exactly match the filter of the same name.
+        EG: a Point filter really uses a Box weighting function
+        with a different support than is typically used.
 
-        */
-        if (resize_filter->filter == Box)       filter_type=BoxFilter;
-        if (resize_filter->filter == Sinc)      filter_type=SincFilter;
-        if (resize_filter->filter == SincFast)  filter_type=SincFastFilter;
-        if (resize_filter->filter == Jinc)      filter_type=JincFilter;
-        if (resize_filter->filter == CubicBC)   filter_type=CubicFilter;
-        /*
-          Report Filter Details.
-        */
-        support=GetResizeFilterSupport(resize_filter); /* practical_support */
-        (void) fprintf(stdout,"# Resize Filter (for graphing)\n#\n");
-        (void) fprintf(stdout,"# filter = %s\n",MagickOptionToMnemonic(
-           MagickFilterOptions,filter_type));
-        (void) fprintf(stdout,"# window = %s\n",MagickOptionToMnemonic(
-           MagickFilterOptions, window_type));
-        (void) fprintf(stdout,"# support = %.*g\n",GetMagickPrecision(),
-           (double) resize_filter->support);
-        (void) fprintf(stdout,"# win-support = %.*g\n",GetMagickPrecision(),
-           (double) resize_filter->window_support);
-        (void) fprintf(stdout,"# scale_blur = %.*g\n",GetMagickPrecision(),
-           (double) resize_filter->blur);
-        if ( filter_type == GaussianFilter )
-          (void) fprintf(stdout,"# gaussian_sigma = %.*g\n",GetMagickPrecision(),
-             (double) sigma);
-        (void) fprintf(stdout,"# practical_support = %.*g\n",GetMagickPrecision(),
-           (double) support);
-        if ( filter_type == CubicFilter || window_type == CubicFilter )
-          (void) fprintf(stdout,"# B,C = %.*g,%.*g\n",GetMagickPrecision(),
-             (double) B,GetMagickPrecision(),(double) C);
-        (void) fprintf(stdout,"\n");
-        /*
-          Output values of resulting filter graph -- for graphing
-          filter result.
-        */
-        for (x=0.0; x <= support; x+=0.01f)
-          (void) fprintf(stdout,"%5.2lf\t%.*g\n",x,GetMagickPrecision(),
-            (double) GetResizeFilterWeight(resize_filter,x));
-        /* A final value so gnuplot can graph the 'stop' properly. */
-        (void) fprintf(stdout,"%5.2lf\t%.*g\n",support,GetMagickPrecision(),
-          0.0);
-      }
-      /* Output the above once only for each image - remove setting */
-      (void) DeleteImageArtifact((Image *) image,"filter:verbose");
-#if defined(MAGICKCORE_OPENMP_SUPPORT)
+      */
+      if (resize_filter->filter == Box)       filter_type=BoxFilter;
+      if (resize_filter->filter == Sinc)      filter_type=SincFilter;
+      if (resize_filter->filter == SincFast)  filter_type=SincFastFilter;
+      if (resize_filter->filter == Jinc)      filter_type=JincFilter;
+      if (resize_filter->filter == CubicBC)   filter_type=CubicFilter;
+      /*
+        Report Filter Details.
+      */
+      support=GetResizeFilterSupport(resize_filter); /* practical_support */
+      (void) fprintf(stdout,"# Resize Filter (for graphing)\n#\n");
+      (void) fprintf(stdout,"# filter = %s\n",MagickOptionToMnemonic(
+         MagickFilterOptions,filter_type));
+      (void) fprintf(stdout,"# window = %s\n",MagickOptionToMnemonic(
+         MagickFilterOptions, window_type));
+      (void) fprintf(stdout,"# support = %.*g\n",GetMagickPrecision(),
+         (double) resize_filter->support);
+      (void) fprintf(stdout,"# win-support = %.*g\n",GetMagickPrecision(),
+         (double) resize_filter->window_support);
+      (void) fprintf(stdout,"# scale_blur = %.*g\n",GetMagickPrecision(),
+         (double) resize_filter->blur);
+      if ( filter_type == GaussianFilter )
+        (void) fprintf(stdout,"# gaussian_sigma = %.*g\n",GetMagickPrecision(),
+           (double) sigma);
+      (void) fprintf(stdout,"# practical_support = %.*g\n",GetMagickPrecision(),
+         (double) support);
+      if ( filter_type == CubicFilter || window_type == CubicFilter )
+        (void) fprintf(stdout,"# B,C = %.*g,%.*g\n",GetMagickPrecision(),
+           (double) B,GetMagickPrecision(),(double) C);
+      (void) fprintf(stdout,"\n");
+      /*
+        Output values of resulting filter graph -- for graphing
+        filter result.
+      */
+      for (x=0.0; x <= support; x+=0.01f)
+        (void) fprintf(stdout,"%5.2lf\t%.*g\n",x,GetMagickPrecision(),
+          (double) GetResizeFilterWeight(resize_filter,x));
+      /* A final value so gnuplot can graph the 'stop' properly. */
+      (void) fprintf(stdout,"%5.2lf\t%.*g\n",support,GetMagickPrecision(),
+        0.0);
     }
-#endif
-
+  /* Output the above once only for each image - remove setting */
+  (void) DeleteImageArtifact((Image *) image,"filter:verbose");
   return(resize_filter);
 }
 \f