08-18-2021, 05:14 PM | #1 |
Junior Member
Posts: 1
Karma: 10
Join Date: Nov 2012
Device: Nook
|
Improving images in ebooks
I am trying to produce some reasonably well-formatted, attractive ebooks from scanned public domain works from Internet Archive, mostly for my own pleasure, but I would like to get good enough to share them. I open the IA epub in Sigil, and use the PDF as a reference to clean up and organize the text. But the images, which were generally b & w sketches, have a very yellowed background. What is the simplest way to get rid of the yellowing? I have played around a bit, trying to edit them in Windows photos, using Paint, or using Gimp. I have no real experience in working with graphics. I actually succeeded once with Gimp totally by accident, and have been unable to figure out what I did! What is the simplest way to do this?
|
08-19-2021, 04:14 AM | #2 |
frumious Bandersnatch
Posts: 7,517
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Image > Mode > Grayscale
Set foreground color to black. Add layer > Foreground color (i.e., add a black layer) Set layer mode to "Burn" (I think it's this one, it should make everything look black, except for completely white stuff on the bottom layer). Select the bottom layer. Color > Levels. Move left slider up to where the curve starts to rise. Move right slider to where the background looks almost all white, maybe with some speckles. (Make sure you have preview enabled.) Create a transparent layer between the two. Set foreground color to white, paint on the middle layer to get rid of the speckles, especially on the borders of the image. Disable the top (black layer). Your image should now look fine. |
Advert | |
|
08-19-2021, 07:06 AM | #3 |
the rook, bossing Never.
Posts: 11,757
Karma: 87663463
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Or in The GIMP:
Import at desired resolution Images -> Mode - > Grey scale Go to menu Colours -> Levels and drag ^ for black level, gamma and white level. You'll see image change. |
08-19-2021, 12:35 PM | #4 |
Grand Sorcerer
Posts: 5,330
Karma: 98809518
Join Date: Apr 2011
Device: pb360
|
archive.org grayscale PDFs from scans compose pages from 2 PBM files and a PGM file. One of the PBM files is a mask which allows the background of the page to be made pure white. Details in the post at:
https://www.mobileread.com/forums/sh...94&postcount=3 |
08-19-2021, 12:39 PM | #5 |
Addict
Posts: 390
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
|
In Gimp, here is what I do and it usually gets results easily good enough for eink readers. (I always use the CBR/CBZ version for OCR, useless to convert their pdfs, they are terrible, and the CBR/CBZ images are nice big originals):
1. Crop the images if necessary (rectangle select, then right-click and Crop to Selection) to get shape the way I want it and get rid of big margins. (Using a CBR/CBZ you are opening the whole page as an image). 2. Right-click and Scale Image. IA images are usually huge. For a full page image I use 1200px as the max height. Resolution at 100px/in or better. If a map, diagram, or something I may want to zoom in on, 300px/in or more. It gets maps you can actually read on eink. 3a. Right-click and use Colours-->Curves. Drag the right side of the curve up to lighten, drag the left side down to darken. If the image isn't too brown or yellow, this is often enough. Experiment! OR 3b. Right-click and Colors-->Desaturate-->Colours to Grey. Then use Colours-->Curves or Colours-->Brightness-Contrast to get a sharp contrast that will show up well on enik. I use this if the image is very brown. If the image wraps around text, I simply use a paint brush to eliminate it. Ctrl-Click to pick up the background colour, then over-paint. If the image is very speckled, a paint brush can help, or go the layer route as Jellby suggests (I've never tried that, sounds good, if complicated). If you have an image, like a title headpiece, that spans two pages, you can easily put them together in Gimp, too. Just open each image, and crop just the left and right margins so the images are at the edge. Export the two images as new files. Then do File-New and make an image as wide as the two cropped images together. Then do File-->Open as Layers and select your two cropped, exported images. They will open on top of each other, so hit "M" (for "move"), and drag them so the edges match up. Then you can re-crop, fiddle the colours, and so on, and export the result. |
Advert | |
|
08-19-2021, 07:39 PM | #6 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
2020: "How to handle images in books while doing OCR of books?" But especially see the 2 older threads I linked to by GrannyGrump + SBT... they both explain how they use photo editors to get rid of the yellow background + do a better grayscale conversion. |
|
08-27-2021, 10:24 AM | #7 | |
Bookmaker & Cat Slave
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
08-27-2021, 02:38 PM | #8 | |
Grand Sorcerer
Posts: 5,330
Karma: 98809518
Join Date: Apr 2011
Device: pb360
|
Quote:
https://www.mobileread.com/forums/sh...d.php?t=341351 |
|
08-27-2021, 04:43 PM | #9 | |
Bookmaker & Cat Slave
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
08-28-2021, 01:06 AM | #10 |
Running with scissors
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Enlarge images in ebooks? | kpoviv | Amazon Kindle | 1 | 12-23-2020 01:32 PM |
Images in ebooks | avonder | Calibre | 2 | 11-05-2016 07:19 AM |
Maps and images in ebooks | dorkmania | General Discussions | 25 | 08-09-2011 07:33 PM |
Color Images in eBooks | Zodler | Which one should I buy? | 5 | 07-22-2011 12:21 PM |
Cover images for my ebooks | mike_bike_kite | General Discussions | 10 | 06-03-2010 04:01 PM |