diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-09-28 02:40:42 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-09-28 02:40:42 +0000 |
commit | 34546ecb9b586f34e04f6e133a247ffe1f50046e (patch) | |
tree | 55c0c6c76c55bfe99a9f3c7dec416604a1c6dbd9 /converter/other/pamtosvg/autotrace.c | |
parent | d484f36f7c690d0a88476127afd9bdf90233699d (diff) | |
download | netpbm-mirror-34546ecb9b586f34e04f6e133a247ffe1f50046e.tar.gz netpbm-mirror-34546ecb9b586f34e04f6e133a247ffe1f50046e.tar.xz netpbm-mirror-34546ecb9b586f34e04f6e133a247ffe1f50046e.zip |
Release 1.04.00
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4700 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/pamtosvg/autotrace.c')
-rw-r--r-- | converter/other/pamtosvg/autotrace.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/converter/other/pamtosvg/autotrace.c b/converter/other/pamtosvg/autotrace.c index e9902669..fa5b7e15 100644 --- a/converter/other/pamtosvg/autotrace.c +++ b/converter/other/pamtosvg/autotrace.c @@ -56,7 +56,7 @@ at_fitting_opts_copy (at_fitting_opts_type * original) return new_opts; } -void +void at_fitting_opts_free(at_fitting_opts_type * opts) { free(opts); @@ -88,10 +88,10 @@ at_output_opts_free(at_output_opts_type * opts) /* at_splines_new_full modifies its 'bitmap' argument when it does the thin_image thing. */ -at_spline_list_array_type * +at_spline_list_array_type * at_splines_new_full(at_bitmap_type * const bitmap, at_fitting_opts_type * const opts, - at_msg_func msg_func, + at_msg_func msg_func, void * const msg_data, at_progress_func notify_progress, void * const progress_data, @@ -128,20 +128,20 @@ at_splines_new_full(at_bitmap_type * const bitmap, if (opts->centerline) { pixel background_color; - if (opts->backgroundSpec) + if (opts->backgroundSpec) background_color = opts->background_color; else PPM_ASSIGN(background_color, 255, 255, 255); - + pixelOutlineList = - find_centerline_pixels(*bitmap, background_color, + find_centerline_pixels(*bitmap, background_color, notify_progress, progress_data, test_cancel, testcancel_data, &exp); } else pixelOutlineList = find_outline_pixels(*bitmap, opts->backgroundSpec, - opts->background_color, + opts->background_color, notify_progress, progress_data, test_cancel, testcancel_data, &exp); @@ -150,8 +150,8 @@ at_splines_new_full(at_bitmap_type * const bitmap, retval = NULL; else { at_spline_list_array_type * splinesP; - - MALLOCVAR_NOFAIL(splinesP); + + MALLOCVAR_NOFAIL(splinesP); fit_outlines_to_splines(pixelOutlineList, opts, haveDistMap ? &distanceMap : NULL, image_header.width, @@ -180,7 +180,7 @@ at_splines_new_full(at_bitmap_type * const bitmap, -void +void at_splines_write(at_output_write_func outputWriter, FILE * const writeto, at_output_opts_type * const optsArg, @@ -195,7 +195,7 @@ at_splines_write(at_output_write_func outputWriter, lly = 0; urx = splinesP->width; ury = splinesP->height; - + if (optsArg == NULL) { newOpts = true; optsP = at_output_opts_new(); @@ -212,9 +212,12 @@ at_splines_write(at_output_write_func outputWriter, -void +void at_splines_free(at_spline_list_array_type * const splines) { free_spline_list_array(splines); free(splines); } + + + |