unidoc / unipdf

Golang PDF library for creating and processing PDF files (pure go)
https://unidoc.io
Other
2.61k stars 254 forks source link

Support JPXDecode Filter (JPEG2000) #41

Open gunnsth opened 5 years ago

gunnsth commented 5 years ago

Add support for decoding and encoding with the JPEG2000 standard.

See section 7.4.9 JPXDecode Filter (PDF32000_2008):

The JPXDecode filter decodes data that has been encoded using the JPEG2000 compression
method, an ISO standard for the compression and packaging of image data.

Implementation

Notes

I am currently not aware of any golang implementations of JPEG2000. However, there are a few open source implementions in other languages that might be a good reference in addition to the standard.

soapiestwaffles commented 2 years ago

bump! We've been seeing a lot of documents come through our services where UniPDF errors withJPXDecode encoding is not yet implemented and it stops us from being able to do what we need to with these documents.

gunnsth commented 2 years ago

@soapiestwaffles We do not have a Pure Go solution for this yet, but we have a workaround that relies on a cgo dependency, see: https://github.com/unidoc/unipdf-examples/blob/master/render/pdf_image_render_custom_encoder_cgo.go

soapiestwaffles commented 2 years ago

@gunnsth PERFECT! That will do just fine, we already have a lot of other CGO dependencies in these projects. Thank you VERY much for this!

dillonkh commented 10 months ago

Any update on this? v3.53.0 still no JPX support.

JPXEncoder implements JPX encoder/decoder (dummy, for now) FIXME: implement
3ace commented 10 months ago

@dillonkh for now you can refer to the workaround provided above.