48 Commits

Author SHA1 Message Date
nkryuchkov
6ffb78b093 Make requested changes according to the PR comments
Add default parameters to the NewCCITTFaxEncoder. Default values
are taken from the PDF specification.
ccittfaxdecode was moved to pdf/internal and renamed to ccittfax.
ccittfax package errors were unexported.
2019-02-18 08:28:34 +03:00
nkryuchkov
54443dab7f Adapt code to the new changes from v3 2019-02-15 23:32:40 +03:00
nkryuchkov
fcf3e8786f Merge branch 'v3' into v3-ccittfaxdecode 2019-02-15 23:01:07 +03:00
nkryuchkov
ffdbb9218e Finish styling 2019-02-15 19:27:44 +03:00
nkryuchkov
8c4bf0b4ef Ensure 90+% test coverage for ccittfaxdecode 2019-02-15 15:23:01 +03:00
nkryuchkov
4c869e88d1 Generate test data for decoding 2019-02-10 19:39:01 +03:00
nkryuchkov
342d1b8362 Fix ToGoImage, ImageToRGB, encoding example
ToGoImage and ImageToRGB now correctly handle 1bit colorspace images
2019-02-05 22:10:56 +03:00
nkryuchkov
7d95a552f6 Add the 1 bit component decoding to ccitt 2019-02-04 22:18:16 +03:00
nkryuchkov
43625d5c66 Add CCITTFaxDecode filter 2019-02-04 19:37:28 +03:00
Adrian-George Bostan
bf695505b1 Prevent encoding infinite loop 2019-01-24 22:46:26 +02:00
Adrian-George Bostan
b477c1430f Add UpdateParams method to StreamEncoder 2019-01-24 22:22:11 +02:00
Adrian-George Bostan
195105ee56 Improve code documentation 2019-01-23 18:57:01 +02:00
Adrian-George Bostan
83052bbc62 Account 1-bit/2-bit color images 2019-01-22 20:11:15 +02:00
Gunnsteinn Hall
94e1c7482f Fix for PNG predictor issues. Fixes #313. 2019-01-16 16:19:59 +00:00
Denys Smirnov
3687c83b37 errors should start with a lower case 2018-12-15 18:49:15 +05:00
Denys Smirnov
3f7ad73812 refactor some receiver and method names; fix typos in comments 2018-12-11 04:37:00 +02:00
Denys Smirnov
0a8b46daff don't use generic receiver names; make sure receiver name is consistent 2018-12-09 21:47:15 +02:00
Denys Smirnov
9f0df8945d don't use XXX for TODOs 2018-12-09 21:39:11 +02:00
Denys Smirnov
6d2c39043c make sure comments begin with a type/function name 2018-12-09 20:22:33 +02:00
Denys Smirnov
e286eecac9 remove unused functions and globals; add todos for unused params 2018-12-09 19:37:07 +02:00
Denys Smirnov
99f3184879 define slices with a var instead of an empty literal 2018-12-09 19:28:50 +02:00
Gunnsteinn Hall
5b1b9bd504 PdfObjectArray change to struct and receivers added Elements, Get, Set, Len. Fixes to resulting broken code. 2018-07-15 17:52:53 +00:00
Gunnsteinn Hall
d234fec92e Allow array in DecodeParms in FlateDecoder of length 1 (containing dict). 2017-08-09 18:09:30 +00:00
Gunnsteinn Hall
cc6883d0ae Fix problem with MultiEncoder DecodeParms. Fixes #97. 2017-08-09 17:43:25 +00:00
Gunnsteinn Hall
574e5b1933 Merging with recent pull request. 2017-08-07 20:30:29 +00:00
Peter Williams
a96a007238 Merge remote-tracking branch 'upstream/master' into xmaster2 2017-08-07 13:57:07 +10:00
Peter Williams
38fa0f1fb4 Added dummy encodings 2017-08-07 13:34:19 +10:00
Gunnsteinn Hall
07289e3890 Check sizes for memory allocation based on pdf user inputs. Fixes #107. 2017-08-06 11:41:33 +00:00
Gunnsteinn Hall
9ec828c8f7 Check to avoid division by zero. Fixes #106. 2017-08-06 11:28:39 +00:00
Peter Williams
a1e1e31fee Merge remote-tracking branch 'upstream/master' into xmaster 2017-08-05 21:25:07 +10:00
Peter Williams
141519790a Fixed some bugs found while getting pdf_descibe.go to work 2017-08-04 17:47:55 +10:00
Gunnsteinn Hall
5bc9d83bb1 Check to ensure row length cannot be greater than data length. Fixes #88. 2017-07-31 12:52:53 +00:00
Gunnsteinn Hall
7f83a4ea2f Add bounds check in crypt, parser. Avoid division by zero. 2017-07-23 20:20:05 +00:00
Gunnsteinn Hall
10c3be8c95 Change PdfObjectDictionary from map to struct and introduce ordered keys. Syntax change. Fixes all around to accommodate changes. Also fixes in test cases. Closes #56. 2017-07-08 21:04:13 +00:00
Gunnsteinn Hall
784a60e42b Encoding fixes for images
Support avg, paeth predictors for decoding. Special error flag for
unsupported error parameters. Support specifying encoder when creating
new image objects (inline,xobject).
2017-04-19 11:46:53 +00:00
Gunnsteinn Hall
8ae4f6a63a Initial implementation of a simple graphics state handler / content stream processor. Multiple changes and fixes in colorspace handling. And more. 2017-03-14 13:04:51 +00:00
Gunnsteinn Hall
5e2931f493 Fix predictor handling for LZW too 2017-03-08 16:56:29 +00:00
Gunnsteinn Hall
fa47660fc6 Predictor encoding handling fix 2017-03-08 16:48:40 +00:00
Gunnsteinn Hall
74c0da0ad7 Part of last commit 2017-03-05 22:42:30 +00:00
Gunnsteinn Hall
61bcb5ad5f Fixes in some colorspace handling for images. Improved XObject form handling. 2017-03-04 17:27:23 +00:00
Gunnsteinn Hall
8a5ae9164a Fix encoder order in MultiEncoder 2017-03-02 12:49:25 +00:00
Gunnsteinn Hall
9247f5d954 Add Trace log level and change Debug to Trace where appropriate. Add log levels to Console logger. 2017-02-28 12:16:46 +00:00
Gunnsteinn Hall
3a6a4bea52 Support flate encoding with predictor 11 2017-02-28 08:58:14 +00:00
Gunnsteinn Hall
445d670f0c Fixes in image and colorspace handling.
DCTDecode filter implemented in core/encoding.go.  Various fixes here
and there.
2017-02-24 17:38:41 +00:00
Gunnsteinn Hall
b4c259460c Implemented ASCII85Decode filter 2017-02-23 15:25:23 +00:00
Gunnsteinn Hall
b8a3ec7180 Initial colorspace and functions support.
Implementation of ps parser for function type 4.  Function type 3 not
implemented yet and type 0 needs a better interpolation. Functions and
colorspaces need more testing.
2017-02-22 21:10:57 +00:00
Gunnsteinn Hall
5566df5057 Add multi encoding support (serial) and basic test case. Added line numbers to logs. 2017-02-13 20:35:42 +00:00
Gunnsteinn Hall
0e533ed292 Refactored encoding and stream support with interfaces. Added encoding support and encoding content streams for PDF generation. 2017-02-13 15:30:36 +00:00