[ 
https://issues.apache.org/jira/browse/PDFBOX-4928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17169779#comment-17169779
 ] 

Christian Appl edited comment on PDFBOX-4928 at 8/3/20, 7:55 AM:
-----------------------------------------------------------------

A method to set the threshold would be perfect!

I tested this with 2.0.20 aswell and I know what you mean, I had similar 
results to PDFBOX-4886. Using 2.0.21 I did not encounter a comparable loss of 
quality, the results are absolutely acceptable.

This really is rather a wish, than an issue.

Some colleagues of mine liked the prescaled version better, others liked the 
unprescaled results. As the perceptions of the results differ in that scale, I 
would simply like to offer an option to enable/disable that feature at will - 
for whatever reason the user would wish to do so and for whatever documents he 
would like to do so.

As far as I am concerned I can't show you bad results. For me both results are 
acceptable.
 i.e. when comparing "unprescaled.png" to "prescaled.png" one can spot minor 
detail losses, when really trying hard, while the unprescaled example does 
indeed show some rough edges here and there.

Overall the prescaled image seems to be a tiny bit more blurry.

Some colleagues liked one better, some the other - I personally did not see 
much of a difference at first. When compared to the original image: Both show a 
loss in detail anyway... as scaling methods tend to result in losses.
 For me this seems to come down to mere personal preference, whether the one or 
the other is "better". Therefore I would suggest either being able to disable 
the prescaling, or to set the threshold - as you suggested.

*Edit:* The original heic image can be found at 
[https://nokiatech.github.io/heif/examples.html|https://nokiatech.github.io/heif/examples.html****]

*Edit:* See [^image-2020-08-03-09-43-37-412.png] for a direct comparison.

*Edit:* I am currently using openjdk11.0.6


was (Author: capsvd):
A method to set the threshold would be perfect!

I tested this with 2.0.20 aswell and I know what you mean, I had similar 
results to PDFBOX-4886. Using 2.0.21 I did not encounter a comparable loss of 
quality, the results are absolutely acceptable.

This really is rather a wish, than an issue.

Some colleagues of mine liked the prescaled version better, others liked the 
unprescaled results. As the perceptions of the results differ in that scale, I 
would simply like to offer an option to enable/disable that feature at will - 
for whatever reason the user would wish to do so and for whatever documents he 
would like to do so.

As far as I am concerned I can't show you bad results. For me both results are 
acceptable.
 i.e. when comparing "unprescaled.png" to "prescaled.png" one can spot minor 
detail losses, when really trying hard, while the unprescaled example does 
indeed show some rough edges here and there.

Overall the prescaled image seems to be a tiny bit more blurry.

Some colleagues liked one better, some the other - I personally did not see 
much of a difference at first. When compared to the original image: Both show a 
loss in detail anyway... as scaling methods tend to result in losses.
 For me this seems to come down to mere personal preference, whether the one or 
the other is "better". Therefore I would suggest either being able to disable 
the prescaling, or to set the threshold - as you suggested.

*Edit:* The original heic image can be found at 
[https://nokiatech.github.io/heif/examples.html|https://nokiatech.github.io/heif/examples.html****]

*Edit:* See [^image-2020-08-03-09-43-37-412.png] for a direct comparison.

> Could the new rendering method of PageDrawer be optional?
> ---------------------------------------------------------
>
>                 Key: PDFBOX-4928
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4928
>             Project: PDFBox
>          Issue Type: Wish
>          Components: Rendering
>    Affects Versions: 2.0.20
>            Reporter: Christian Appl
>            Priority: Major
>         Attachments: image-2020-08-03-09-43-37-412.png, prescaled.png, 
> unprescaled.png
>
>
> This relates to {color:#008dde}PDFBOX-4516, PDFBOX-4527, PDFBOX-4815, 
> PDFBOX-4886, PDFBOX-4863{color}{color:#008dde}
>  I have tested the new prescaled rendering method for the 
> {color}org.apache.pdfbox.rendering.{color:#008dde}PageDrawer 
> {color:#172b4d}with PDFBox:2.0.21-SNAPSHOT{color}{color} for different 
> images, with different resolutions, target image sizes etc. and compared the 
> results to our old expectations (pre 2.0.20). And I really like it!
>  
>  However it seems to depend on the person's subjective perception (atleast 
> for my tested images), whether I like the old or the new results better. When 
> asking my colleagues, I heard arguments for both sides.
>  
>  Therefore my question is: Could a RenderingHint be introduced to 
> disable/enable this separately and more intentionally, instead of assuming, 
> that the scaling method must always be applied for specific scaling factors?
>  This would allow users to select the scaling method according to their own 
> liking and needs.
>  
>  I can not really find a crystal clear, objective answer, whether the one or 
> the other is "better", therefore I would prefer being able to de/activate it 
> according to my own judgement.
>  As far as I understand, the criterion (scaleX < {color:#1750eb}0.5 {color}|| 
> {color:#000000}scaleY {color}< {color:#1750eb}0.5{color}) has been selected 
> rather arbitrarily.( ? )
>  But what if I want to apply it even to images above those scaling factors?
>  What if I want to not apply it to images bellow those scaling factors?
>  What if I want to apply it to Image A, but not to Image C, for some unknown 
> reason?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to