More Dithering Options When Rasterizing Pages

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
mCHSNUg5Pz8cPap
User
Posts: 125
Joined: Wed Aug 04, 2021 6:36 pm

More Dithering Options When Rasterizing Pages

Post by mCHSNUg5Pz8cPap »

Hi PDF-XChange Team,

I recently found this software and I cannot believe how awesome it is. It has so many great features. Two that I especially appreciate are the ability to rasterize and resize files by pushing a button (instead of reprinting or exporting them like I must do in Acrobat DC).

One suggestion I have is to provide more dithering options when rasterizing pages. I regularly submit files to a government agency (USPTO) that stores everything as monochrome (as in each pixel is either black or white) documents. The agency will convert non-monochrome documents to monochrome ... and the conversion often makes the documents look bad. I also must keep the file size below 25 MB. I find myself needing to adjust the dithering algorithm to provide the best quality document and still stay within the file size limitations.

I have a printer driver that allows me to: (i) choose the dithering algorithm and (ii) adjust the intensity used by the dithering algorithm. I'd like it if the rasterize pages menu provided the same functionality. I'll explain the idea in a bit more detail.

First, by way of background, here is a link describing common dithering methods:

https://tannerhelland.com/2012/12/28/dithering-eleven-algorithms-source-code.html.

As you can see there are around a dozen rasterizing algorithms that have been developed over the years. I've found that some work better in certain situations (e.g., document with lots of color images) and others work better in other situations (e.g., document with grayscale line drawings).

The current rasterize pages menu looks like this:
Image

I propose modifying it to include an option to select the dithering algorithm (perhaps with a drop down menu) and the intensity cutoff used by the algorithm. The printer driver I currently use has these options. They look like this:
Image

You probably don't need to support every dithering algorithm, but it would be good to support the following algorithms:
1. Threshold (the pixel is converted to black or white depending on whether it is above or below a threshold.
2. Stucki
3. Jarvis-Judice-Ninke
4. Floyd-Steinberg
5. Burkes

It is important to make it possible to adjust the intensity (the cutoff value used in the different dithering algorithms). The printer driver makes it possible to adjust this value using the slider. It has a sample picturing showing how changing the slider will affect the image, which is nice, but not necessary.

The article I linked to above describing dithering methods includes a link to Git Hub page with code for each algorithm (the code does not allow the user to adjust the cut-off value so it would need to be modified to do that). The code is available under a BSD license so maybe you can use it as a starting point.

Thanks for reading. I look forward to any feedback you have.

BTW, I work with a lot of other people who must interface with the USPTO and deal with the same problems. I will pitch it to the entire group (probably around a 100 people) to switch from Acrobat DC to PDF-XChange. The benefits are too many not to switch.
Last edited by mCHSNUg5Pz8cPap on Thu Aug 05, 2021 9:26 pm, edited 1 time in total.
Features I really want:
1. Fully customizable toolbars: https://forum.tracker-software.com/viewtopic.php?p=167585
2. Sanitize documents w/o being forced into save as dialog (Acrobat has this!): https://forum.tracker-software.com/viewtopic.php?p=156130
bqxmprij
User
Posts: 162
Joined: Tue Dec 18, 2012 3:51 am

Re: More Dithering Options When Rasterizing Pages

Post by bqxmprij »

I am fairly certain that group has at least thousands of members. :D

I mentioned that the developers here are extremely responsive to such requests and upvote this request because this solution would help me too. Thank you.
User avatar
David.P
User
Posts: 1510
Joined: Thu Feb 28, 2008 8:16 pm

Re: More Dithering Options When Rasterizing Pages

Post by David.P »

I suggest the existence of PDF-XChange Editor to not be brought to the attention of the group that has been mentioned above.

The advantages of using PDF-XChange Editor over other PDF programs are of downright indecent proportions. I would therefore rather not share these advantages with third parties, even more so when they operate in the same industry.

Image
Last edited by David.P on Fri Aug 06, 2021 8:43 pm, edited 2 times in total.
David.P
PDF-XChange Pro
mCHSNUg5Pz8cPap
User
Posts: 125
Joined: Wed Aug 04, 2021 6:36 pm

Re: More Dithering Options When Rasterizing Pages

Post by mCHSNUg5Pz8cPap »

bqxmprij wrote: Thu Aug 05, 2021 3:42 pm I am fairly certain that group has at least thousands of members. :D
LOL. I think I know what group you are thinking of, and I believe I already pitched it to them. Anyway, I was thinking of the people in the firm I'm at, which definitely is less than a thousand members.
Features I really want:
1. Fully customizable toolbars: https://forum.tracker-software.com/viewtopic.php?p=167585
2. Sanitize documents w/o being forced into save as dialog (Acrobat has this!): https://forum.tracker-software.com/viewtopic.php?p=156130
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8440
Joined: Wed Jan 03, 2018 6:52 pm

Re: More Dithering Options When Rasterizing Pages

Post by TrackerSupp-Daniel »

Hi, everyone!

Thank you for the thoughtful request and thorough explanation. I have considered this, and determined that it is two separate feature requests, which can be handled individually. This does mean that it is possible only one, both, or neither will be accepted when the Dev team review these tickets, I cannot promise that they will for certain be implemented, or when.

With that out of the way, the two tickets created are as such:
RT#5685: FR: Offer Dithering options in rasterize pages
RT#5686: Expand dithering options


As usual, these tickets are internal only, and as feature requests will be reviewed by the Dev team when we are next looking for new features. As such they are unlikely to be implemented in a short timeframe. In the future, you can ask me here about either ticket number direct, and I can check if there are any updates on tis status for you.

In the meantime, a workaround that will probably work for you, is that after you have rasterized the document, you can then use the "re-compress images" function, which then offers the monochrome and dithering options you do need. This effectively makes it onyl a two step process to accomplish what you need currently. To make full use of this function, ensure that you customize the settings for each image type (true color, greyscale, indexed), and configure them all to convert to monochrome with dithering:
image.png
I hope it helps!

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
mCHSNUg5Pz8cPap
User
Posts: 125
Joined: Wed Aug 04, 2021 6:36 pm

Re: More Dithering Options When Rasterizing Pages

Post by mCHSNUg5Pz8cPap »

TrackerSupp-Daniel wrote: Thu Aug 05, 2021 8:26 pm In the meantime, a workaround that will probably work for you, is that after you have rasterized the document, you can then use the "re-compress images" function, which then offers the monochrome and dithering options you do need. This effectively makes it onyl a two step process to accomplish what you need currently. To make full use of this function, ensure that you customize the settings for each image type (true color, greyscale, indexed), and configure them all to convert to monochrome with dithering:
Daniel,

Thanks for responding. I'm not sure the workaround will change anything. My understanding is that "Black & White" in the rasterize pages setting provides a bitonal image (every pixel is either black or white). Monochrome on the other hand can be bitonal or include shades of gray (each pixel can be black, white, or a defined shade of gray). I was probably a bit loose with my terminology in the initial post, but what I need is black and white images where I can adjust the dithering.

I'm all in favor of you allowing more control of dithering settings in other areas as well. For example, in the recompress images operatoin or in the export to images to operation. Also, although I am mostly interested in dithering options for bitonal black and white images, it would also be good to have the same options for monochrome images as well (I believe the dithering algorithms I linked to will work for monochrome images containing shades of gray, but I'm not certain).
Features I really want:
1. Fully customizable toolbars: https://forum.tracker-software.com/viewtopic.php?p=167585
2. Sanitize documents w/o being forced into save as dialog (Acrobat has this!): https://forum.tracker-software.com/viewtopic.php?p=156130
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8440
Joined: Wed Jan 03, 2018 6:52 pm

Re: More Dithering Options When Rasterizing Pages

Post by TrackerSupp-Daniel »

Hi, mCHSNUg5Pz8cPap

Well, a workaround is just that, a temporary, and probably imperfect, stopgap that has the potential to help in some circumstance until a proper solution appears.

The recompress pages function does also offer a "black and white" setting, so you can certainly select that, the only aspect you have requested that we cannot currently offer is customization of the of the dithering technique. As mentioned above, a feature request ticket has been made on that front, but there is little more that I can offer here.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
User avatar
Jensen Head
User
Posts: 412
Joined: Mon Sep 13, 2021 8:12 am

Re: More Dithering Options When Rasterizing Pages

Post by Jensen Head »

mCHSNUg5Pz8cPap wrote: Thu Aug 05, 2021 2:10 pmstores everything as monochrome (as in each pixel is either black or white) documents
mCHSNUg5Pz8cPap wrote: Thu Aug 05, 2021 9:15 pmMy understanding is that "Black & White" in the rasterize pages setting provides a bitonal image (every pixel is either black or white). Monochrome on the other hand can be bitonal or include shades of gray (each pixel can be black, white, or a defined shade of gray).
The application interface has some confusion with terms. For example, on the screen "Recompress Image: Greyscale" in the Image Options block Setting "Convert to" has the following options for a choice:
  • No Conversion
  • RGB
  • CMYK
  • Indexed
  • Monochrome
  • Black & White
Do I understand correctly that in the terms of Tracker Software "Black & White" means a special case "Monochrome", which, in turn, is a special case "Indexed"? At the same time, there is no option "(Indexed) Greyscale with ... colors of palette without forced colors and transparency".
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: More Dithering Options When Rasterizing Pages

Post by Ivan - Tracker Software »

Black&White is a case of monochrome where each pixel can be white or black.
Monochrome also uses two colors, but not necessarily white. It might be, say, green. Like old days monochrome monitors :)
Indexed is a case where a limited amount of colors (palette) is used. The number of colors in the palette varies from 2 to 256.
Technically, b&w is a subset of monochrome which is in turn a subset of indexed.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
mCHSNUg5Pz8cPap
User
Posts: 125
Joined: Wed Aug 04, 2021 6:36 pm

Re: More Dithering Options When Rasterizing Pages

Post by mCHSNUg5Pz8cPap »

I was surprised to see this post bumped up to the top again.

I no longer have strong feelings about adding more dithering algorithms. The default algorithm used for the rasterize pages features provides a good trade-off between quality and file size. The Stucki algorithm shown in the image in the original post provides slightly better quality, but the file is also quite a bit larger.

That said, if you did implement different dithering algorithms, then I think you should do so by providing a slider with one end labeled "better image quality" and the other labeled "small file size." The default setting would be what it is now. If the user adjusts the quality higher, then the algorithm can be the Stucki algorithm in the original post. If the user adjusts the file size lower, then the algorithm can be one of the others such as Floyd Steinberg.

For example, the slider can have four positions:
1. (best image quality): Stucki dithering algorithm with 95 intensity (this is what is shown in the OP).
2. (default position of slider): This is the current algorithm and settings used by PDF-XChange for the rasterize feature.
3. This setting uses the Jarvice-Judice-Ninke algorithm with 80 intensity (this produces a smaller file but not as high quality).
4. (small file size): Floyd Steinberg algorithm with 100 intensity (this produces an even smaller file size that is lower quality).

None of this is high priority. Your default algorithm is quite good.
Features I really want:
1. Fully customizable toolbars: https://forum.tracker-software.com/viewtopic.php?p=167585
2. Sanitize documents w/o being forced into save as dialog (Acrobat has this!): https://forum.tracker-software.com/viewtopic.php?p=156130
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8440
Joined: Wed Jan 03, 2018 6:52 pm

Re: More Dithering Options When Rasterizing Pages

Post by TrackerSupp-Daniel »

Hello, mCHSNUg5Pz8cPap

Thank you for the suggestions, I think that this topic was bumped because Jensen here wanted to understand more about the conversion options overall, as opposed to reviving the discussion about dithering, but we will keep this in mind if we look into further dithering improvements.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Post Reply