simple-scan pdf compression

Bug #1886279 reported by Degrange Thomas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
simple-scan (Ubuntu)
New
Wishlist
Unassigned

Bug Description

Hello,

PDF compression cannot appropriately be configured.

Having taken a look at the latest source code of simple-scan:
1) simple-scan compresses each image in ZLIB or JPEG depending on the compressed size (it keeps the ZLIB version if it is smaller than the JPEG)
2) the "quality" setting only applies to JPEG

With this in mind, I think it is impossible to use simple-scan to create a PDF full of lossless ZLIB images for archiving documents where we want to keep quality at the expense of the size.

Best regards

description: updated
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

The code responsible for encoding pdf is available here:
https://gitlab.gnome.org/GNOME/simple-scan/-/blob/master/src/book.vala#L348

It is comparing jpeg with zlib:
https://gitlab.gnome.org/GNOME/simple-scan/-/blob/master/src/book.vala#L479

How would you like to change it?
What do you think about setting quality to maximum, force zlib compression?

Changed in simple-scan (Ubuntu):
status: New → Incomplete
Revision history for this message
Degrange Thomas (tdegrange) wrote :

As a user I like to know what happens inside things.

I would like a combo-box in "preferences" giving the following choices for saving to pdf:
1) Jpeg or zlib (smallest one chosen for each image) -> default
2) Jpeg only (lossy)
3) Zlib only (lossless)

Your proposition is much simpler, however it remains opaque to users.

It depends on the audience you target.

Note: I just installed everything to disable jpeg compression in a local build (quick hack) and debug the program. It is my first time with Vala + Gtk. So we may have more technical discussion now.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for simple-scan (Ubuntu) because there has been no activity for 60 days.]

Changed in simple-scan (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Degrange Thomas (tdegrange) wrote :

I am still interested into having this point taken into account.

Changed in simple-scan (Ubuntu):
status: Expired → New
Changed in simple-scan (Ubuntu):
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.