Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify whether Briss crops losslessly #35

Closed
jmtd opened this issue Jan 22, 2022 · 3 comments
Closed

clarify whether Briss crops losslessly #35

jmtd opened this issue Jan 22, 2022 · 3 comments
Labels

Comments

@jmtd
Copy link

jmtd commented Jan 22, 2022

Documentation request: Does Briss crop losslessly? Put another way: are images embedded in PDF pages decoded and re-encoded/re-rastered (which, in the case of lossy images, would result in a potential quality degredation)? Thanks!

@mbaeuerle
Copy link
Owner

I can't really assure you that it's lossless as it is using some libs for this process.
However from my current understanding it doesn't re-encode the content.
It could even be the case that it doesn't remove the cropped parts at all but only changes which parts are visible.

@cleydyr
Copy link
Collaborator

cleydyr commented Mar 31, 2022

From

pageDict.put(PdfName.CROPBOX, scaleBoxArray);
I'd guess the cropping is just an attribute added to the PDF file which determines the visible part of the document. So there's no actual encoding/decoding involved.

@cleydyr
Copy link
Collaborator

cleydyr commented Jul 28, 2022

As the evidence so far shows that the crop is just an attribute that determines the visible part of the document, not implying any re-encoding of the media contained inside it, we can safely assume that the answer is "the crop rendering implementation is left to the readers according to the PDF specification instead of depending on Briss itself".

I'm closing this issue as answered.

Thanks

@cleydyr cleydyr closed this as completed Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants