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

Brightness-contrast #4788

Open
dima-iod opened this issue Feb 1, 2025 · 5 comments
Open

Brightness-contrast #4788

dima-iod opened this issue Feb 1, 2025 · 5 comments

Comments

@dima-iod
Copy link

dima-iod commented Feb 1, 2025

Есть некоторые файлы в формате PDF, в которых нет текста. Вместо этого в них одни изображения и достаточно плохого качества. Такие файлы очень тяжело читать, особенно в слух. Приходится часто запинаться и возвращаться к началу предложения. Соответственно и слушателям дискомфортно. Производительность падает.

Прошу добавить возможность установить для документа или страницы новые значения яркости\контрастности\чёткости изображений на странице. Даже если вся страница это одно сплошное изображение (скан) или вся книга это набор изображений.

Например, в MS Word можно выбрать изображение и изменить его параметры, в том числе, яркость-контрастность и т.д.

Image

There are some PDF files that don't have text in them. Instead, they contain only images and are of poor quality. Such files are very difficult to read, especially by ear. You often have to stumble and go back to the beginning of a sentence. Accordingly, the listeners are uncomfortable. Productivity is falling.

Please add the option to set new values for the brightness\contrast\clarity of the images on the page for the document or page. Even if the entire page is one solid image (scan) or the entire book is a set of images.

For example, in MS Word, you can select an image and change its parameters, including brightness-contrast, etc.

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented Feb 1, 2025

SumatraPDF cannot EDIT like Word can
SumatraPDF is a viewer with limited abilities to adjust the foreground and background colours depending on format being monochrome.

Image

@tribals
Copy link

tribals commented Feb 1, 2025

It is common function of a reader to adjust gamma of radings, in order to make them more readable - no need to "edit", only slight adjustments.

Such adjustments could be applied to the whole document - no need to select only text, or image parts of it.

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented Feb 1, 2025

@tribals that is what I show above "whole document" settings have always been there but they are limited in how they can be used by MuPDF. -B background -C contrast

Image

if you go "inverted" it can only be worse

Image

@dima-iod
Copy link
Author

dima-iod commented Feb 1, 2025

@GitHubRulesOK

SumatraPDF cannot EDIT like Word can SumatraPDF is a viewer with limited abilities to adjust the foreground and background colours depending on format being monochrome.

I understand that SumatraPDF cannot edit files like Word and
that SumatraPDF is a viewer with limited capabilities.

But SumatraPDF can rotate left and rotate right:

Image

And that doesn't make SumatraPDF an editor.

Then why not add the ability to increase the contrast of images?

After all, at the current
TextColor = #000000
backgroundColor = #ffffff
contrast can only be reduced.

Please, add the option to set new values for the brightness\contrast\clarity to SumatraPDF.
At least increase the contrast. Just like the rotate left was added.

Image

Image

Image

Image

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented Feb 2, 2025

@dima-iod
I am simply a messenger
the RANGE of Brightness/Contrast/Gamma is fixed by the RGB hardware from BLACK/OFF = RGB 000000 to FULLY BRIGHT WHITE /ALL ON = RGB FFFFFF

SumatraPDF uses MuPDF colour rendering from black to white and any sRGB colour between those 2 limits

Maximum contrast is 000000/FFFFFF OR inverted as FFFFFF/000000
there are no other values beyond those.
To edit each grey to become white requires you decompress the image and edit some of the pixel colours to adjust either red or green or any combination per 3x pixels. This is why we have tools like GIMP, IrfanView Illustrator etc they are pixel editors.

SumatraPDF is tied to simply MOVING the ENDPOINTS (= less black / less white = less contrast)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants