forked from DanBloomberg/leptonica
-
Notifications
You must be signed in to change notification settings - Fork 1
/
version-notes.html
1731 lines (1614 loc) · 92.7 KB
/
version-notes.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html>
<body BGCOLOR=FFFFE4>
<!-- JS Window Closer -----
<form>
<center>
<input type="button" onclick="window.close();" value="Close this window">
</center>
</form>
----- JS Window Closer -->
<!-- Creative Commons License -->
<a rel="license" href="http://creativecommons.org/licenses/by/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.gif" /></a>
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attribution 2.5 License</a>.
<!-- /Creative Commons License -->
<!--
<rdf:RDF xmlns="http://web.resource.org/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="">
<dc:title>leptonica</dc:title>
<dc:date>2001</dc:date>
<dc:description>An open source C library for efficient image processing and image analysis operations</dc:description>
<dc:creator><Agent>
<dc:title>Dan S. Bloomberg</dc:title>
</Agent></dc:creator>
<dc:rights><Agent>
<dc:title>Dan S. Bloomberg</dc:title>
</Agent></dc:rights>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
<dc:source rdf:resource="www.leptonica.com"/>
<license rdf:resource="http://creativecommons.org/licenses/by/2.5/" />
</Work>
<License rdf:about="http://creativecommons.org/licenses/by/2.5/">
<permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<permits rdf:resource="http://web.resource.org/cc/Distribution" />
<requires rdf:resource="http://web.resource.org/cc/Notice" />
<requires rdf:resource="http://web.resource.org/cc/Attribution" />
<permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
</License>
</rdf:RDF>
-->
<pre>
/*====================================================================*
- Copyright (C) 2001 Leptonica. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials
- provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*====================================================================*/
</pre>
<h2 align=center>Version Notes for Leptonica</h2>
<h3 align=center>3 Jan 2024</h3>
<hr>
<h2 align=center> <IMG SRC="moller52.jpg" border=1 ALIGN_MIDDLE> </h2>
<hr>
<p>
Note: The following are highlights of the changes in each version.
They are <i>not</i> a complete listing of the modifications.
<pre>
1.86.0 Not released
* Modify compressFilesToPdf() to allow upscale interpolation for
low resolution pdfs.
* Source files changed: pageseg.c, pdfapp.c
* Prog files changed: binarizefiles.c, compresspdf.c, croppdf.c,
misctest2.c
1.85.0 Oct 16, 2024
* Use wrapper callSystemDebug() instead of system() in programs.
* Fixed Issue #730: artifacts and bad compression with pixWriteJp2k.
Results are now identical with ImageMagick convert (to jp2).
* With PR732, Anton Tykhyy made pix(Read,Write)MemJp2k work with
direct memory access using openjpeg opj_stream functions. This
removes need for temp file on Windows when writing to/from memory.
* Achieve consistency with fclose() in library and lept_fclose()
in progs. Ditto for lept_free, lept_calloc, lept_fopen(), etc.
* Fix generation of bad colormap indices in
jbcorrelation and jbrankhaus
* Fixed coverity scan issues.
* Added findpattern2_reg.c to show generation of sels and their use.
* Added misctest2.c to show crop and clean page functions.
* Added page crop option for removing noise on left and right sides.
* Added page crop option to allow printing to full width of paper.
* Added page crop option to extract page within larger black image.
* Added renderpdf.c to library, to render pdfs as page images with
a specified resolution.
* Modified cleanpdf.c to use l_pdfRenderFiles().
* Issues #750, #752: problems in bmpio.c with taking address of
packed member.
* Source files changed: adaptmap.c affinecompose.c,
bmpio.c, boxbasic.c, colormap.c, compare.c,
dewarp1.c, dnabasic.c, fpix1.c, gifio.c,
gplot.c, grayquant.c, jbclass.c, jp2kheader.c,
jp2kheaderstub.c, jp2kio.c, jpegio.c, libversions.c,
morphseq.c, numabasic.c, pageseg.c partify.c, pdfapp.c,
pdfio2.c, pix2.c, pixabasic.c, pixcomp.c, pixconv.c,
pnmio.c, psio2.c, ptabasic.c,
readfile.c, recogbasic.c, renderpdf.c,
sarray1.c, sel1.c, utils2.c, writefile.c,
allheaders.h, environ.h
* Prog files changed: alltests_reg.c, binmorph3_reg.c,
blend2_reg.c, blend4_reg.c cleanpdf.c, compressedpdf.c, croppdf.c,
findpattern_reg.c, findpattern1_reg.c findpattern2_reg.c,
htmlviewer.c, jbcorrelation.c, jbrankhaus.c,
jp2kio_reg.c, libre_makefigs.c, misctest1.c, misctest2.c,
pdfio2_reg.c, printimage.c, printsplitimage.c,
printtiff.c, psioseg_reg.c, splitpdf.c,
string_reg.c, tiffpdftest.c, xtractprotos.c
1.84.1 Jan 3, 2024
* Remove support for openjpeg versions < 2.1.
* Improve error handling for stringLength() and stringCat(), and
add tests in prog/string_reg.
* Source files changed: blend.c, dnafunc1.c, jp2kio.c, pageseg.c,
partify.c, pix1.c, ptafunc2.c, sarray2.c, utils2.c
* Prog files changed: boxa3_reg.c, string_reg.c, writetext_reg.c,
deskew_it.c
1.84.0 Dec 23, 2023
* Add getPdfPageCount() to find the number of pages in a pdf file.
* Add getPdfPageSizes() and getPdfMediaBoxSizes() to find the
information necessary to render images properly. Modify cleanpdf.c
and concatpdf.c to use this information.
* Add prog/splitpdf.c to split a pdf file into nearly equal page sets.
* Add ability to read and write rgba in bmp format, and
test in ioformats_reg.
* Add regression test prog/partition_reg.c
* Change the autotools library name from liblept to libleptonica,
to be consistent with the cmake library name. (Apologies to Jeff!)
* Add tests for 24 bit pix reading and writing in bmp and png in
ioformats_reg. Test new pixDisplayDiff() for visualizing diffs.
* Allow prog/concatpdf to output pdf with tiffg4 encoding and with
mixed tiffg4 and DCT encoding depending on image color content.
* Rename prog/concatpdf --> prog/compresspdf
* Put image processing and generation of output pdf from compresspdf
and cleanpdf into functions in new files: pdfapp.c, pdfappstub.c.
* Add versatile function for cropping an image and filling to
page size, along with prog/croppdf to do this on pdf file.
1.83.0 Dec 20, 2022
* Simplify setting the title of pdf files.
* Catch tiff failure to open stream in fopenTiffMemStream()
* Check for POSIX functions fstatat() and dirfd() before use.
* In prog/cleanpdf: do not allow threshold to exceed 190. Make all
parameters required; do not use default values for invalid parameters.
* In prog/concatpdf: add input param for title; add jpeg quality factor
* Fix flaky hash_reg test on i686: sets generated from SelectRange()
can depend slightly on platform.
* Convenience function for adding multiple black and white borders.
* Fix oss-fuzz issue 42202: underined shift in l_convertCharstrToInt().
* Fix oss-fuzz issue 43841: made pixCountPixels() more efficient.
* Fix oss-fuzz issue 44008: pixCountArbInRect() used wrong depth.
* Always return tiff resolution of 0 (unknown) if not set.
* Simplify operations on pix memory to help avoid mem leaks
* Make bmp non-support of 32-bit bmp (rgba) files explicit.
* Improve tiff read resolution conversion by rounding.
* Use stdatomic.h to make cloning string safe.
Remove all *GetRefcount() and *ChangeRefcount() accessors.
* Replace procName and mainName strings by __func__.
* Remove information about fields in many structs from the public
interface allheaders.h, instead putting them in internal files
pix_internal.h, array_internal.h and ccbord_internal.h.
* Increase the .so number from 5.4.0 to 6.0.0.
* Rename the autotools generated libraries from liblept to libleptonica
* Fix potential memory leaks from recogAverageSamples() and
recogDebugAverages() by not destroying a recog.
1.82.0 Sept 22, 2021
* Fix issue-585: reading tiff rgb with tiffbpl = 1.5 * packedbpl.
* Fix issue-586: failure to properly wrap tiff-g4 in pdf without
transcoding. The fix is to do transcoding for tiff-g4, as was
done before April 2021.
1.81.1 June 11, 2021
* Added choice of codec (JP2 or J2K) when writing jp2k files.
* Fix use of hashmap with key based on dna.
1.81.0 June 6, 2021
* Fixed problems with tiff pdf wrapping photometry.
* Fixed scaling issues in prog/cleanpdf for printing.
* New progs: tiffpdftest, hashtest
* Fixed uninitialized data error in pixAddBorderGeneral() and
pixRemoveBorderGeneral()
* Rewrote Numa functions that discretize into bins. Have
binning by both sorting and histogram.
* Rewrote and simplified pixGetRankColorArray() and pixGetBinnedColor().
* Added tests to prog/rankbin_reg.c.
* Simplified fpixCopy() and dpixCopy(), and functions that use them.
* Check input for bilateral transforms.
* Add function for splitting a file evenly by lines.
* Check input for getFilenamesInDirectory()
* Many new fuzzers.
* Use size_t for all size inputs to ascii85 encoding/decoding
* New regression tests: encoding_reg.c, binmorph6_reg.c,
flipdetect_reg.c
* Reworked concatpdf for generality, using the Poppler package.
* Removed dwa flipdetection from the library. All the dwa code
is now in flipdetectdwa.c.notused. Likewise prog/flipselgen.c
is retained for completeness, renamed flipselgen.c.notused,
and is not compiled.
* Added hashmap utility (hashmap.c, hashmap.h).
* Removed functions using dnahash on strings, pts and doubles.
* Improved the speed of hashing for strings and doubles.
* Added function for tiling images in pairs for comparison.
* Added null terminations to serialized strings written to memory,
preventing buffer overrun by strlen() [fixed by Stefan Weil].
* No longer use "NoInit" versions of pix creation in leptonica.
because they risk reading uninitialized data. These functions
remain in the library because they are in use in applications.
* Add two composite binarization functions, from prog/binarize_set.
* Giulio Lunati fixed pnm reading to work with stdin input.
* Removed several of the boxa compare and modify functions.
* Implemented reading jpeg200 data encded in j2k "codestream" format.
Can now read data in both jp2 and j2k.
1.80.0 28 July 2020
* Improve bmp handling of 1 bpp images and sanity checking of params.
* Add function to display all rgb gamut colors
* in Makefile.am, use option serial-tests to avoid races in testing
* Make m4 subdirectory and add ax_split_version.m4 there
* Simple function for hue-invariant mapping (pixMapWithInvariantHue)
* Fixed bug in limit of ptra size when used for sorting by bins.
* Use hashmap to count pixel colors in RGB(A) images.
* Convert hashtest program to regression test hash_reg.
* Convert croptest program to regression test crop_reg.
* New color segmentation by region growing (colorfill.c)
* New regression tests: colorfill_reg, circle_reg, ccbord_reg.
* Set maxima for all allocations for common leptonica data structures.
* Don't fail when downscaling 2, 4, 8, and 32 bpp images, even
to one pixel, invoking pixScaleSmooth().
* New functions that select 1 bpp components based on their area.
* Incremental addition to sorted array of numbers.
* new prog/fuzzing directory for oss-fuzz based fuzzing programs
* use of pixcmapIsValid() with extra argument to determine validity
with the pix it is attached to.
* Use lept_stderr() in all programs in the prog directory.
* New program rasteroptest() for thorough testing of rasterop functions.
* Removed the pixSaveTiled*() functions
* Stubbed pixDisplayWrite(). Last used in tesseract 3.04.01 (2/2016).
1.79.0 1 Jan 2020
* Clean up auto-generation of files; removed 'register'
* Some fixes for issues identified by fuzzer
* New source files: checkerboard.c
* New programs: replacebytes.c, webpanimio_reg.c, partifytest.c,
rectangle_reg.c, lowsat_reg.c, rotate_it.c, scale_it.c, dewarp_it.c,
pdfio1_reg.c, pdfio2_reg.c, checkerboard_reg.c, underlinetest.c.
* Convert to standard reg test: heap_reg.c, pixa1_reg.c, smallpix_reg.c
* Improve data checking when reading image file headers
(pnm, png, jpeg, tiff)
* Fix some bugs in pnm reading
* Fix inconsistencies with the encoding type flags in pdf writing
* Allow tiff to write images with colormaps
* Fix errors in PS code; made some functions static
* Add code for animated webp (requires webp mux and demux libraries)
* Add "partify" application for separating parts in a musical score
* Enable tif read/write of gray+alpha and rgba; filter out tiff
pixels that are not uint and compression by tile
* Apply consistent formatting of static const variables
* Add programs for scaling, rotation and deskew, named dewkew_it,
rotate_it and scale_it, for useful operations on arbitrary images.
* Convert pdfiotest program to two regression tests: pdfio1_reg
and pdfio2_reg.
* Remove all use of strncat; use stringCat().
* New functions from removing outliers in sequences of boxes.
* Generalize pixAverageInRect(): mask, region and range filters,
and subsampling. New pixAverageInRectRGB().
* Fix int overflow bug in pixMedianCut(); required new heap accessor.
* New pixMultiplyGray() allows pix to be multiplied by an array (or
another pix)
* Better routines for counting color.
* Lossless conversion for RGB to cmap with not more than 256 colors.
* New histo based global thresholding: pixThresholdByHisto().
* Allow most reg tests to run even if external libraries are not
available.
* New one-line gplot functions that return a pix.
* New application to find where corners meet in a checkerboard.
* Add utility functions for painting through mask in cmap pix,
creating a hit-miss sela from a color pix, equality of two pta.
* Proper handling of 1 bpp colormap tiffs: remove when reading,
preserve when writing.
* Deprecate three pixSaveTile*() functions; removed all calls to
these from the library and progs.
* Include auto_config.h explicitly in all src and prog files.
* Improve input data checking for bmp files.
* Added pixAutoPhotoinvert() for tesseract, to automatically photo-
invert text regions where the background is black and text is white.
1.78.0 21 Mar 19
* Various improvements in handling boxa sequences and transforms.
* New regression tests: boxa4_reg, string_reg
* New function for copying a pix, filtered by a boxa.
* Modify histogram method for image comparison.
* More careful attention to invalid boxes in box geometry functions.
* Better string and array functions for search and replace.
* Convenience functions for generating simple masks.
* Allow pdf writing of jp2k images, in full generality.
* Allow writing compressed ps images for printing.
* Modified enum comments to include a suggested enum name.
* New program: imagetops
1.77.0 14 Dec 18
Here is the current status of CVE issues with leptonica; see
https://security-tracker.debian.org/tracker/source-package/leptonlib
* CVE-2018-7442: potential injection attack because '/' is allowed
in gplot rootdir.
Functions using this command have been disabled by default in the
distribution, starting with 1.76.0. As for the specific issue, it
is impossible to specify a general path without using the standard
directory subdivider '/'.
* CVE-2018-7186: number of characters not limited in fscanf or sscanf,
allowing possible attack with buffer overflow.
This has been fixed in 1.75.3.
* CVE-2018-3836: command injection vulnerability in gplotMakeOutput().
This has been fixed in 1.75.3, using stringCheckForChars() to block
rootnames containing any of: ;&|>"?*$()/<
* CVE-2017-18196: duplicated path components.
This was fixed in 1.75.3.
* CVE-2018-7441: hardcoded /tmp pathnames.
These are all wrapped in special debug functions that are not
enabled by default in the distribution, starting with 1.76.0.
* CVE-2018-7247: input 'rootname' can overflow a buffer.
This was fixed in 1.76.0, using snprintf().
* CVE-2018-7440: command injection in gplotMakeOutput using $(command).
Fixed in 1.75.3, which blocks '$' as well as 11 other characters.
Wrapped the few 'system' calls in an extra layer of debug code.
More coverity scan fixes; defects are about 1 per 10,000 source lines.
New regression tests: numa1_reg, numa2_reg, lowaccess_reg,
pixmem_reg.
New non-regression test programs: histoduptest
Juergen Buchmueller is working on Lua bindings. He typedef'd l_ok
and used it in 1100 functions that return a success/failure status.
He also helped clean up remaining issues in the doxygen-generated
documentation.
Using a packed struct for bmp headers to avoid crash on
some big-endians.
Fixed a bug in the prototype parser for xtractprotos that was
surfaced by a typedef declaration for the bmp headers.
Cleaned up IOS guards to avoid compiling a system(3) call on IOS.
Renamed autobuild --> autogen.sh
Added some basic pixa functions for rotation and translation.
Added an iterative method to find rectangular coverings for
arbitrary connected components.
Converted two tests to reg tests running in alltests_reg:
ptra1_reg, ptra2_reg
Enabled read/write for standard jpeg compressed tiff images.
Enabled reading for the old (deprecated) jpeg-encoded tiffs.
Fix range selectors for pixa, pixaa, boxa, boxaa, pta:
Now, last = -1 goes to the end.
When reading tiff --> pix, insert IMAGEDESCRIPTION into text field.
Converted iotest to reg test iomisc_reg; added to alltests_reg
Converted rasterop_reg into a standard regression test; added
to alltests_reg.
Converted boxa2_reg and fhmtauto_reg into standard regression tests;
added to alltests_reg.
Split boxa sequence functions out of boxfunc4.c, into a new boxfunc5.c.
Simplified bmp header and made reading more clearly endian
agnostic (Juergen Buchmueller)
New boxa3_reg regression test. This tests sequences of boxes
by two new boxfunctions in boxfunc5.c.
New bootnumgen4.c for more digit templates.
Rename prog/recog_bootnum.c --> prog/recog_bootname1.c
New in prog: recog_bootnum2.c, recog_bootnum3.c, recogtest7.c
Fixed uninitialized data in pixCentroid() on 1 bpp pix.
New reg test: bytea_reg.c. (removed byteatest.c)
Fixed bug in non-transcoding pdf generation from 1 bpp png.
Added LGTM to static analyzers that run over the library.
1.76.0 1 May 18
Modify infrastructure to fix outstanding security issues. By default,
you can no longer create temp directories and temp files whose
names are known to the compiler. Also, prevent "system" calls,
which were used for image display and gnuplot.
Replaced remaining sprintf() with snprintf() in prog tests.
Added non-transcoding functions for generating pdf from jpeg pixacomp
Add control of jpeg quality from pixWriteMem() and pixWriteStream()
Fixed getFilenamesInDirectory() to properly identify directories
Prevent size overflow in calloc for kernel; cleaned it up fpix and dpix
bmp reading now accepts negative height
Simplified splitimage2pdf; it no longer uses ps2pdf
Remove name-mangling WRITE_AS_NAMED compile option.
Removed 2 deprecated write functions.
Added these regression tests:
locminmax_reg, speckle_reg, watershed_reg,
1.75.3 15 Feb 18
Fixed some coverity scan issues.
Autotools fix to check for png if enabling gnuplot (James Le Cuirot).
1.75.2 11 Feb 18
Converted several progs to standard regression tests.
Added these tests to the alltests_reg suite:
adaptnorm_reg, binmorph1_reg, binmorph3_reg, equal_reg,
extrema_reg, grayfill_reg, falsecolor_reg, grayquant_reg.
Autotools fix for restricting giflib to 5.1+, and allowing
openjpeg 2.3 (James Le Cuirot).
1.75.1 31 Jan 18
Simpler and more accurate function for finding word masks from
text image; better debugging and more thorough testing.
Added to regression test set: prog/italic_reg
Fix for potential injection attack using gplot rootdir.
Bug fix for bmp reading to set opacity.
1.75.0 24 Jan 18
This is a new version, for major Ubuntu release 18.04.
$TMPDIR path rewriting turned off on Unix; only used for Windows.
Added pix conversion to depth 2 and 4. We now have general
converters to 1, 2, 4, 8, 16 and 32 bpp.
Modified giflib to use read/write from/to memory; no temp files;
no longer support versions before 5.1.
Move most low-level code from separate files to their callers;
about 30 of them became static.
Improved table detection on scanned page images (tests: pageseg_reg.c)
Added support for write/compare regression tests for files.
Modified printimage for more flexibility.
Enable lookup by key on comma-separated key/value text file.
Update README.html for building with Visual Studio.
Improved functions for getting pixel averages in RGB images
Simplified and speedup of unsharp masking.
New function for detecting and correcting text orientation.
Remove slow sharpening operation when not appropriate during scaling.
Better handling of gplots with 0 or 1 data point.
Coverity scan fixes.
Modified jpeg2000 header to use openjpeg 2.3.
Improved depth accessors for pixa and pixaa; added size accessors
for pixa and pixaa.
Bug fix in webp interface on read error.
New function that finds the closest boxes in a boxa to any particular
box, in each of 4 directions.
New regression tests in automated sequence: blend5_reg, quadtree_reg,
wordboxes_reg.
New program: textorient
Removed programs: snapcolortest
1.74.4 11 Jun 17
Converted two progs to reg tests
New version because 1.74.3 had some spurious files (xtractprotos,
endianness.h)
1.74.3 9 Jun 17
Coverity scan fixes.
Several fixes for running on Windows, including subtle one with tiff
encoding depending on pad bits.
Utility and test if a page image likely has a table.
Remove use of pixCreateTemplateNoInit() where it may cause problems.
Make release 'configure-make ready'
1.74.2 19 May 17
Many simplifications and improvements to recognizer.
Cleanup of doxygen comments
Encoded pdf title in escape 4-byte hex (for safety)
Fixed several hundered coverity scan possible leaks
Added about 20 regression tests to the automated set.
Improved vertical alignment of dewarp.
Implemented preliminary method for correcting dewarp foreshortening
due to page curvature.
Improved multipage tiff reading and writing.
Added a new version of textline finding.
Fixed bug in fast 2D sharpening code (used in some scaling ops)
BMP i/o rewritten to implement memory version directly.
PNG i/o functions added for encoding and decoding directly to memory.
Method for finding light color regions on scanned page images.
1.74.1 3 Jan 17
Configuration changes to support the patch number in the
version (major.minor.patch).
Removed all remaining pixDisplayWrite() calls in prog/.
Cleaned up and/or promoted about 15 programs to full regression
tests. There are now 95 tests in the regression set.
Over half the initial coverity scan warnings have been removed.
1.74.0 10 Dec 16
Leptonica development was moved to github. The master is at:
github.com/danbloomberg/leptonica
Egor Pugin is the maintainer of the site.
A very large number of changes have been made. Some of them follow;
details can be found in the git commit messages.
Static makefiles modified to work with gnu*9 and c*9.
Modify SET macros to work on windows.
New modes for RGB --> gray conversion.
New functions added for displaying a pix from a pixa.
Split out sort/hash/set/map functions for dna, sarray and pta.
More robust horizontal deskew on multi-column page images.
Improve webpio_reg test.
Remove X11 display for gplot; it is no longer supported.
Remove most sleep calls, which were put in for gplot; no longer needed.
Removed use of gthumb in library.
Removed use of pixDisplayWrite() in the library; still in some progs.
Improved test for endianness in makefile.static; no longer requires
any local files or building and running a program.
Modified all files for doxygen output (spearheaded by
Juergen Buchmueller)
Improved plotting of the boxes in a boxa.
Replaced the slow point hash function with a simple fast one.
Added pam (4 component) format writing to pnmio.c (Juergen Buchmueller)
Improved rendering of pixa in side/by/sides.
Better utilities for pixa and pixacomp.
Add read/write serialization functions from/to memory for all
the major data structures that do not already have them.
More serialized boot recognizers stored as self-generating code.
Cleaned up generating an adapted recognizer from the boot recognizer.
Simplified temp file naming; removed most instances of named
temp files from non-debug code; use tmpfile() and a wrapper
l_makeTempFilename().
Simplify and streamline multipage tiff reading (Jeff Breidenbach).
Improvement of Otsu thresholding.
Recognize outstanding contributors to leptonica over the years.
New gif mem read/write interface that avoids writing a temp file,
contributed by Tobias Peirick.
Use double arrays (dna) instead of float (numa) for set ops.
Enrolled in coverity scan to find potential bugs (Stefan Weil
managed it). Fixed about 200 of them, mostly potential memory
leaks from early function exit.
Cleanup of gray quantization functions and tests.
Refactored connectivity-conserving operations, to make them more useful.
Provided methods for measuring and regularizing the width of strokes.
Removed viewfiles.c from library; code is now in prog htmlviewer.c.
Better debugging in page segmentation (pageseg.c)
Deprecated the pixDisplayWrite*() debugging methods.
Added about 15 regression tests to the framework in alltests_reg.c
Final mods for compatibility with tesseract 4.00.
1.73 25 Jan 16
All lept_* functions have been rewritten to avoid path rewrites for
output to temp files, which were introduced in 1.72.
Now, (1) files are written to the directory specified and (2) we
are careful to write to subdirectories of /tmp/lept/ for all test
programs, starting with the reg tests and prog/dewarp* and
prog/recog*. This also required re-writing stringcode.c and
stringtemplate1.txt to write temp files to subdirectories.
Goal is to write to the specified path while not spamming the
/tmp and /tmp/lept directories. This is particularly important
on windows because files in the <TEMP> directory are not cleared
on reboot.
Naming changes (to avoid collisions):
#defines MALLOC --> LEPT_MALLOC, CALLOC --> LEPT_CALLOC, etc.
ByteBuffer --> L_ByteBuffer
Added grayscale histogram functions that can be used to compare images.
Added functions to determine if an image region has horizontal
text lines.
Added functions to compare photo regions of images to determine
if they're essentially the same.
Added red-black tree utility functions to implement maps and sets.
The keys for maps and sets can be 64-bit entities (signed and
unsigned integers and doubles).
Implemented hashsets and hashmaps, using 64 bit keys.
Replaced the numaHash by l_dnaHash; removed numa2d
Improved security of tiff and gif reading, to prevent memory corruption
when reading bad data.
Removed src files: bootnumgen.c
Added src files: rbtree.c, rbtree.h, map.c, bootnumgen1.c, bootnumgen2.c
Added prog files: rbtreetest.c, maptest.c, settest.c, hashtest.c,
recog_bootnum.c, percolatetest.c
Added files for building using cmake (Egor Pugin)
1.72 5 Apr 15
Better handling of 1 bpp colormap read/write with png so that
they are losseless. The colormap is always removed on read and
the conversion is to the simplest non-cmapped pix that can fully
represent the input -- both with and without alpha.
Fixed overflow bug in pixCorrelationBinary().
Fixed orientation flags and handling of 16 bit RGB in tiff.
Also new wrappers to TIFFClientOpen(), so we no longer go through
the file descriptor for memory operations.
Improvements in the dewarp functions.
New box sequence smoothings.
New antialiased painting through mask; previously it was only
implemented for connected components in a mask.
Better error handling and debug output with jpeg2000 read/write.
Implemented base64 encoding. This allows binary data to be represented
as a C string that can be compiled. Used this in bmf utility.
Implemented automatic code generation for deserialization from
compiled strings (stringcode.*)
Regression tests write to leptonica subdir of <Temp> in windows; in
unix it is optional. This avoids spamming the <Temp> directory.
Added new colorspace conversions (XYZ, LAB).
New source files: encoding.c, bmfdata.h, stringcode.c, stringcode.h,
bootnumgen.c.
Removed source files: convolvelow.c, graymorphlow.c
New programs: genfonts_reg, colorize_reg, texturefill_reg,
autogentest1, autogentest2.
alltests_reg now has 66 tests.
1.71 18 Jun 14
This version supports tesseract 3.04. In particular, 3.04
has automatic conversion of a set of scanned images, either in a
directory or coming directly from a scanner, into pdf with injected
text. This is something we've wanted to do for several years!
Improved jp2k header reading, including resolution.
Removed src files: rotateorthlow.c, pdfio.c, pdfiostub.c
Renamed jp2kio.c, jp2kiostub.c ==> jp2kheader.c, jp2kheaderstub.c.
These header reading functions parse the jp2k files, and
don't require a jpeg2000 library.
New jp2kio.c, jp2kiostub.c, that uses openjpeg-2.X to read
and write jp2k. We now support I/O from these formats:
png, tiff, jpeg, bmp, pnm, webp, gif and jp2k
as well as writing to PostScript and pdf.
New pdfio1.c, pdfio1stub.c, pdfio2.c pdfio2stub.c, where we've
split functions into high and low level.
Fixed memory bug in bilateral.c
Improved reading/write of binary data from file. For example,
l_binaryReadStream() can now be used to capture data piped
in via stdin.
Font directory now arg passed in everywhere (not hardcoded)
Don't write temporary files to /tmp; only to a small number of
subdirectories, to avoid spamming the /tmp directory. E.g.,
for regression tests, the current output is now to /tmp/regout/.
For jpeg reading modify pixReadJpeg() to take as a hint
a bit flag that allows extraction of only the luminance channel.
Allow wrapping of pdf objects from png images without transcoding
(thanks to Jeff Breidenbach)
Better support for alpha on read/write with png, including
1 bpp with colormap, alpha (supported in png with transparency array)
1.70 3 Feb 14 (distribution to debian; ubuntu 14-04; 4.1.0)
New bilateral filtering.
New simple character recognition utility.
Improved dewarping functionality, in model building and rendering.
More flexible use of ref models.
Better and more consistent handling of alpha layer in RGBA, though
use of the spp field. Ability to handle more png files with alpha,
including palette with alpha.
New fast converters from jpeg and jpeg2000 to pdf, without transcoding.
Made bmp reader (and pix reading in general) more robust; avoid
size overflow errors.
New text labelling operations; depth conversion of a set of images
New license (essentially BSD 2-clause), to specify conditions
for both source and binary distribution.
Improved auto make: make all progs, install just 11, test 61.
New src files: bilateral.{c,h}, dewarp1.c, dewarp2.c,
dewarp3.c, dewarp4.c, jp2kio.c, jp2kiostub.c,
pixlabel.c, recogbasic.c, recogdid.c, recogident.c,
recogtrain.c, recog.h
New prog files: adaptmap_dark.c, alphaxform_ret.c,
bilateral_reg.c, binarize_reg.c, binarize_set.c,
blackwhite_reg.c, blend1_reg.c, blend3_reg.c, blend4_reg.c,
boxa1_reg.c, colorcontent_reg.c, coloring_reg.c,
colorspace_reg.c, compare_reg.c, converttopdf.c,
croptest.c, dewarprules.c, dewarptest1.c, dewarptest2.c,
dewarptest3.c, dewarptest4.c, displayboxa.c, displaypix.c,
displaypixa.c, findcorners_reg.c, fpix1_reg.c,
fpix2_reg.c, fpixcontours.c, insert_reg.c, italictest.c,
jpegio_reg.c, label_reg.c, multitype_reg.c, nearline_reg.c,
newspaper_reg.c, numa1_reg.c, numa2_reg.c, recogsort.c,
recogtest1.c, shear1_reg.c, webpio_reg.c, wordboxes_reg.c
Removed src files: arithlow.c, binexpandlow.c, binreducelow.c,
dewarp.c
Removed prog files: blend_reg.c, blendtest1.c,
dewarptest.c, fpix_reg.c, inserttest.c, numa_reg.c, rotatetest2.c
shear_reg, xvdisp.c
1.69 16 Jan 12 (distribution to debian; ubuntu 12-04; 3.0.0)
Fixed bug in pdf generation for large files, using a new
double array (dnabasic.c). Added several new modes for pdf
generation from sets of images.
Dewarp based on image content now aligns to left and right margins;
works at book level; is more robust to bad disparity models;
version 2 serialization.
Fixed regutils to return the actual number of errors.
Improved sorting efficiency of numas in cases where binning,
which is order N, makes sense.
Fixed fpix serialization (now version 2).
New version (5) of xtractprotos, allows putting prototypes in-line in
allheaders.h. Having them separately in leptprotos.h still an option
New copyright (BSD, 2 clause) on src files.
Removed all trailing whitespace in src files.
New src files: boxfunc4.c coloring.c, dnabasic.c
New prog files: dna_reg.c, alphaops_reg.c
Removed prog file: alphaclean_reg.c
1.68 10 Mar 11
Fixed windows issues with passing pointers across C-runtime boundaries
when using dlls, by providing special functions (e.g., lept_fopen()).
Proper version numbers are now set with automake.
New utility (quadtree.c) for generating quadtree statistics.
New utility (in colorspace.c) for conversions to and from YUV.
Refactored functions for assembling image data for generating
either PS or PDF images using g4, jpeg or flate encoding.
Better tempfile names, using current time in microseconds.
Functions for getting resolution from jpeg and png files.
Use size_t throughout for reading and writing binary data.
Deprecate arrayRead*() and arrayWrite() functions; replace in
the library with l_binaryRead*() and l_binaryWrite().
Better handling of colormap images for in-place rasterop and shear.
New utility (bytearray.c) for parsing and handling binary data;
used for generating PDF files.
New utility (pdfio.c) for generating PDF files.
Refactored regutils functions to make them simpler to use.
Top-level deskew now works on any image.
Added functions in utils.c for cross-platform development, mostly
for functions that make and remove directories, copy, move
and delete files, etc. It should now be straightforward to write
programs that will compile and run on windows.
Reg tests have better printout; all give timings.
New utility program: convertfilestopdf
1.67 9 Nov 10
Autoconf: now built with James Cuirot's config files that
build the library and all 200 progs.
New sudoku solver. Just a game, but there are interesting aspects.
Modified parseprotos.c to reject a type of "extern" decl.
Add faster implementation for very small gray morphology
operations (3x1, 1x3, 3x3).
Eliminate warnings on recent gcc if you don't check return values
from fread, fscanf, fgets, system, etc.
Convolution: new functions for windowed variance and stdev; allow
non-square kernel for windowed mean square.
Put stdio.h and stdlib.h in alltypes.h, so they're not required
in any .c files.
Replace numaConvolve(), which is just a windowed mean, by
windowed statistics functions (mean, mean square, variance).
Generalize pixExtractOnLine() for arbitrary lines.
Add pix interface to webp (webpio.c, webpiostub.c). This is a
new open source codec, based on the video codec vpx (webm).
Serialization of FPix and DPix
Interconversion between FPix and DPix
Integer scaling of FPix and DPix; includes the last row and column.
New convertfiles.c: depth conversion on files in a directory.
Testing programs in prog:
convolve_reg.c, numa_reg.c: expanded test set
projection_reg.c (tests pixRowStats(), pixColumnStats())
dewarptest.c: output ps and pdf files
writemtiff.c: simple driver to write images to a single file
1.66 3 Aug 10
More tweaks for including (or not) bounding box hints for
PS wrapping. Default is to write b.b., but not in functions
that wrap images as full pages (psio1.c, psio2.c)
pix4.c split in two files, and added function to identify c.c.
that are sufficiently similar in shape to rectangles (pix5.c)
Modify 2 and 4 bit setters to clip the input value so that it can
only affect the pixel requested (arrayaccess.c, arrayaccess,h)
New pseudorandom sequence functions (numafunc1.c)
Dewarping camera-based images using textlines (dewarp.c, prog/dewarp*)
Geometrical function for aggregating overlapping bounding boxes.
Programs to generate figures for book chapter "Document Image
Applications" in "Mathematical Morphology: theory and applications"
(see: http:/www.leptonica.org/najman-talbot-book-chapter.html)
(prog/livre*.c)
Functions that do affine and other operations in images with
alpha blending at edges: pix*WithAlpha(). Also do this
with a gamma/inverse-gamma wrapper to further reduce edge aliasing.
(rotate.c, scale.c, projective.c, affine.c, bilinear.c,
prog/alphaxform_reg.c)
Improved color segmentation (fixed bugs; made faster)
Higher order least square fits: quadratic, cubic, quartic. (pts.c)
Various mods for otsu binarization and the *SplitDistribution*()
functions (numafunc2.c, prog/otsutest2.c)
Control sampling in convolution output (convolve.c, prog/fpix_reg.c)
Morphological operations on numas (numafunc1.c, numafunc2.c,
prog/numa_reg.c)
Pix serialization wrapped so we can use pixRead(), etc on these
files (spixio.c, readfile.c, writefile.c)
Gif read/write to memory fixed (and cheated -- using files) (gifio.c)
New fpix and dpix accessors; contour rendering on fpix (fpix1.c, fpix2.c)
Various functions for linearly mapping colors and displaying arrays
of colors (pix4.c, blend.c, prog/rankhisto_reg.c)
Functions for getting approximate ranges of colors and color
components in an image (pix4.c, colormap.c)
Cleaned up windows platform and compiler defines and macros.
1.65 5 Apr 10
Added regression test utility functions for standardizing and
automating construction and running of regression tests. Makes the
golden files when the 2nd arg to the reg test is 'generate'.
(regutils.{c,h})
Converted 22 reg tests in prog to use this; invoked with alltests_reg.
Goal is to put all prog/*_reg.c into this format and put a set
of golden files on the web.
Small fixes in gifio for handling streams properly.
New functions for shifting colors, hue invariant transforms, etc
(blend.c)
prog/dwamorph*.c: rename *1_reg.c to dwalineargen.c; others
converted to standard reg tests.
New rgb convolution functions.
For PS output, write all images with a bounding box hint and with
page numbers, which works for both embedded (e.g., in tex) and
full page generated PS. Once converted to pdf, this is fine
in all situation.
New functions for initialization and random insertion with pixcomp.
For color quantization, make the lightest color white if sufficiently
close; ditto for black (colorquant1.c, colorquant2.c).
Rank binning of 8 bpp and rgb images (numafunc2.c, pix4.c)
A function to rank colors by the intensity of the minimum comp (pix4.c)
New pixRotateBinaryNice(), rotates 1 bpp pix in such a way that
the shear lines aren't visible. (rotate.c)
New pixSaveTiledWithText(), a convenience function to append text
to images that are being tiled. (writefile.c)
Stereoscopic warping functions and stereo pair functions (warper.c)
Linear interpolated shear -- better than rasterop shear (shear.c)
Option to use higher quality chroma (U,V) sampling in jpeg (jpegio.c)
Rename Bmf --> L_Bmf.
New tests in prog:
alltests_reg.c alphaclean_reg.c, psio_reg.c, rankbin_reg.c,
rankhisto_reg.c, warpertest.c
1.64 3 Jan 10
Easy setup for standard byte processing on 8 bpp pix (pix2.c)
Evaluation of difference between similar images; test for
similar images and (compare.c)
Subpixel scaling, with color input and separate scale factors (pixconv.c)
Fix tiff header reader to get correct format (tiffio.c)
Enable pixDisplay() to work with i_view (windows) and with
xzgv and xli as well as xv; allow application to choose
which to use (writefile.c).
Use a mask to specify regions that are changed by a morphological
operation (morphapp.c).
Improve the default sharpening for scaling (scale.c)
Function to test for equivalence of file data (utils.c)
Select and read image files with embedded index (readfile.c)
Fix box size calculation in pixEmbedForRotation(); solution
provided by Brent Sundheimer.
New pixDisplayMultiple(), instead of calling gthumb directly; this
is now set up to use i_view for windows.
Changed criteria for determining if an image is color (colorcontent.c,
colorquant{1,2}.c.
Optional mode where the filename extension is automatically written
to output image files; particularly useful for windows.
Initialize boxa and pixa as full, with minimal placeholders.
Get rank valued numbers and boxes in numa and boxa.
Cute implementation for finding largest solid rectangle (maze.c)
New median cut quantization for mixed (color/gray) images (colorquant2.c)
Many changes to allow the library and applications be built easily
in windows. There is now a thorough windows readme, written by Tom
Powers, for doing this. The windows build information and
project files are now in a new vs2008 directory.
1.63 8 Nov 09
Added pixScaleToGrayFast(), a faster version with very similar quality.
Fixed scaleGrayLILow() to handle edge pixels more accurately
Text processing:
new text application (finditalic.c, prog/finditalic.c) for locating
words in italic type style.
Easier to add text to a pix using the bitmap font stored in
the font directory; see, e.g., prog/writetxt_reg.c.
Blending of 2 images with an alpha channel: pixBlendWithGrayMask()
Fixed bug in color segmentation; it now (again) works properly.
New utility (pixcomp.c) for handling compressed pix arrays in
memory; new PixComp and PixaComp structs.
Fast serialization of pix without compressing (pixSerializeToMemory
and pixDeserializeFromMemory); required serialized colormaps
FileI/O: new functions for reading file headers.
PostScript generation modernized; split psio.c into psio1.c
and psio2.c; added level 3 (flate) encoding.
new functions for reading and writing multipage tiffs, for
arbitrary input images. For writing, compression is lossless
(either g4 or zip)
update all I/O stub files
Miscellaneous: new pixaAddBorderGeneral(); new functions in pix3.c
for counting fg pixels and summing 8 bpp pixels by column and row;
new numaUniformSampling() for resampling with interpolation;
subpixel scaling.
New or improved regression tests in prog:
extrema_reg, pixalloc_reg, blend2_reg, rotateorth_reg,
ioformats_reg, colorseg_reg, pixcomp_reg, pixserial_reg,
writetext_reg, psioseg_reg, subpixel_reg.
Interface changes:
findFileFormat() and findFileFormatBuffer(): now returns format
using input ptr. The function return value is 0 if OK; 1 on error
rename: pixThresholdPixels() --> pixThresholdPixelSum()
1.62 26 Jul 09
Expanded composite Dwa implementation as a sequence of operations,
so that it now works beyond a size of 63. It's typically about 2x
faster than the composite rasterop implementation (with help
from Ankur Jain). Also use data transfer instead of data copy
whenever possible. Thorough tests with binmorph4_reg and binmorph5_reg.
New functions in colorseg.c for masking and histogramming in HSV
color space.
Treat string constants rigorously as const char*, initializing
to char[] if to be used as non-const, or in some cases casting
to char*. This avoids compiler warnings.
Improved color quantization using existing colormap for octcubes
and a new version for grayscale. This will rigorously map most
black and most white octcubes (rsp) to black and white
if they exist in the colormap.
Fast quantization to an existing colormap for color and grayscale.
Fixed some bugs; e.g., in pixAffineSampled() for 1 bpp with
L_BRING_IN_BLACK; reading and writing pnm for 2 and 4 bpp.
In pngio.c, enable compile time control over these settings:
converting 16 bpp --> 8 bpp on read
removing alpha channel on read
setting zlib compression on write
For general scaling, allow sharpening to be optional, and provided
faster sharpening operations.
Improve support for 16 bpp grayscale.
For scaleToGray* functions, reduce the width truncation.
In psio.c, new functions for converting segmented page images
(text and image) into level 2 PostScript.
Removed all implicit casting to const char*.
New custom pix memory allocator, designed for large pix whose
memory needs to be reused many times.
In xtractprotos, we now allow prepending an arbitrary string to
each prototype.
In environ.h, additions for MSVC to work with VC++6, including
prototpye strings for dll import and export (thanks to Ray Smith).
In colorseg.c, new functions for building HSV histograms, finding
peaks, and generating masks based on the peaks.
New or improved regression tests:
pixalloc_reg, binmorph4_reg, binmorph5_reg, conversion_reg,
scale_reg, cmapquant_reg,
1.61 26 Apr 09
New histo-based grayscale quantization: pixGrayQuantizeFromHisto(),
that is used in new pixQuanitzeIfFewColorsMixed().
Made final fix in pixBlockconv(). No underflows; no more overflows!
More efficient rgb write with pnm.
Add proto to jpegiostub.c, allowing proper use of the stubber.
Fix several filter functions to use proper test on filter size; viz.,
pixMinMaxTiles(), several functions in convolve.c.
Redo shear implementation to handle arbitrary angles, to handle
colormapped images, and to avoid the singularity at pi/2.
Removed both static vars from pixSaveTiled().
Generalized pixRotate() to handle colormapped images, and to use
pixRotateBySampling() in place of the removed pixRotateEuclidean().
New skew finder for full angle range, pixFindSkewOrthogonalRange().
For skew detection, now allow shear about image center as well as
about the UL corner.
New rotation reg tests: rotate1_reg.c and rotate2_reg.c.
Better serialization format for boxaa; introduce new version numbers
for boxaa, pixa, and boxa, as required.
Proper init in boxGetGeometry(), boxaGetBoxGeometry(), and the
accessors in sel1.c and kernel.c.
Improved Numa functions in numafunc1.c and numafunc2.c; in
particular, numaMakeHistogramAuto() and numaGetStatsUsingHistogram().
With all histo generators, make sure the start and binsize params
are properly set and are used.
Interface change: Use these parameters implicitly in
numaHistogramGetRankFromVal() and numaHistogramGetValFromRank().
Interface change to ptaGetLinearLSF(): add 1 optional parameter.
In several pixaDisplay*() functions, handle colormaps properly.
pixafunc.c split to pixafunc1.c and pixafunc2.c.
New connected component selections and options in pixaSort.
Patch from Tony Dovgal for reading tiff rgba files.
Added new logical operation options for numas.
New pixConvertRGBToGrayMinMax() that chooses min or max of 3 components.
Computation of pixelwise aligned stats between multiple images
of the same size (e.g., video), in pix4.c.
Very fast binsort implemented for boxa and pixa.
Cleanup and rename stack, queue, heap and ptra functions:
all structs and typedefs start with "L_"
all functions start with "l"
Sel creation for crosses and T junctions.
New thresholding operations to binary; split out from adaptmap.c
into binarize.c.
Implementation of sauvola binarization, including use of pixtiling.
Added composite parallel union and intersection morphological operations.
Small changes to scaling and rotation to improve accuracy; only
visible on very tiny, symmetric images.
Implemented DPix (double precision data); useful for the mean
square accumulator for sauvola binarization.
New fast hybrid grayscale seedfill, in addition to the interative
version (contributed by Ankur Jain).
New or improved regression tests:
rotate1_reg, rotate2_reg, shear_reg, numa_reg, skew_reg,
ptra1_reg, ptra2_reg, paint_reg, smallpix_reg, pta_reg,
pixmem_reg, binarize_reg, grayfill_reg.
1.60 19 Jan 09
Fixed bug in pixBlockconv(), introduced in 1.59, that causes
overflow when convolving with an image that has white (255)
at the edges. [quickly found by Dave Bryan]
Include function to display freetype fonts in a pix.
The files freetype.c and freetype.h are in the distribution, but are not
yet linked into the library. This is contributed by Tony Dovgal,
and this version works only for MSVC.
Found that the problems with binary compression in giflib are fixed