11-25-2019, 03:59 PM | #16 | |
Well trained by Cats
Posts: 30,439
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
OTOH even if the trigger is not exclusive: Search Either Replace-next or Search (a skip) again Have the preview pane visible . It is amazing how fast you can bounce thru 50 uses |
|
11-25-2019, 04:29 PM | #17 |
Guru
Posts: 781
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
|
OK. Improved version.
It works in two ways: a) if the file is identical, it will of course change the name of the other files to the reference name. b) if the file is not identical but has a width that is in the range given - it will also change its name to the reference name. If "Width From" or "Width To" is 0, point b) will not be taken into account. |
Advert | |
|
11-25-2019, 06:37 PM | #18 | |
Wizard
Posts: 2,303
Karma: 12126963
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Converting pdf to png images That would crop out that surrounding whitespace. (This is the one and only time I unzip an EPUB manually, run conversion on the images, then drag/drop the corrected images back into the EPUB, then reopen in Sigil.) |
|
11-25-2019, 07:04 PM | #19 | |
Resident Curmudgeon
Posts: 76,310
Karma: 136006010
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
11-25-2019, 08:45 PM | #20 |
Wizard
Posts: 2,303
Karma: 12126963
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
|
Advert | |
|
11-25-2019, 09:16 PM | #21 |
Well trained by Cats
Posts: 30,439
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
11-25-2019, 09:53 PM | #22 | |
Wizard
Posts: 2,303
Karma: 12126963
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
But I just tested, and it looks like it's only manual. You have to manually drag a box and tell Calibre to trim. Having to do that for every fleuron? Imagemagick's -trim is automated. Complete Side Note: I was just looking in The Expanse books... and they have a 91x69px fleuron of a little lightning bolt... 80.7 KB JPG... I was able to convert to 1.2 KB PNG... talk about unoptimized! It's ~6% of the total size of the book! |
|
11-25-2019, 10:10 PM | #23 | |
Well trained by Cats
Posts: 30,439
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
You can really tell the folk who don't know what they are doing by the variety :^) of styling between chapters |
|
11-26-2019, 03:18 AM | #24 | |
Banned
Posts: 168
Karma: 10010
Join Date: Oct 2018
Device: Tolino/PRS 650/Tablet
|
Quote:
And so on and so on. If you have 200 pictures, and 70 of them are the same fleuron stored multipls times, this is a boring, error-prone manual work. If this happens once ore twice, i wouldnt have thought about another solution. And i'm not the only one having this cases. And I find it highly interesting how other people deal with Sigil. For example, I would never have thought of deleting the images in the report and sorting them out by renaming them. |
|
11-26-2019, 09:25 PM | #25 | |||||
Wizard
Posts: 2,303
Karma: 12126963
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
If you "Open Tab", it'll highlight the file in the Book Browser too, so you can easily know which one to rename: (This is one thing Sigil does WAY better than Calibre's Editor. When you have a huge list of files+images, Sigil keeps the active one visible within Book Browser at all times.) (And with drag/droppable tabs back in Sigil [yay!], it makes sorting through a mess of files like this much easier. ) Quote:
It's one of the handful of reasons why I much preferred Book View over Preview. Quote:
It's why it's always good to have discussions on these forums, then everyone puts their minds together and figures out the best ways and learns together. Quote:
Quote:
https://www.fonts.com/content/learni...yphs/end-marks https://en.wikipedia.org/wiki/Tombstone_(typography) Seems like it's a print-holdover thing... Well, in the ebook, the conversion company decided to have microscopic-sized JPGs. Hundreds and hundreds of them... every article had its own "unique" black square. Last edited by Tex2002ans; 11-26-2019 at 09:36 PM. |
|||||
11-26-2019, 10:04 PM | #26 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Please note that individual graphics are often used to "watermark" some epubs in order to originally identify who the book was sold too. Information can also be encoded right into the pixel values themselves (steganography) that can not be detected visually, and further "watermarks" can be also be found in hex css fields such as colour values.
I have found 2 books that used multiple ways to hide their "watermarking". Never understood why on earth you would hide a watermark but .... could this be one of those rare cases? Last edited by KevinH; 11-26-2019 at 10:07 PM. |
11-26-2019, 11:20 PM | #27 | |
Bookmaker & Cat Slave
Posts: 11,493
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
11-26-2019, 11:42 PM | #28 | |||
Wizard
Posts: 2,303
Karma: 12126963
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
I don't believe any major retailers do such a thing, and just host the same exact file to send to all customers. All I recall is reading about it every so often, like in this The Digital Reader article: https://the-digital-reader.com/2016/...watermark-drm/ Quote:
Quote:
If anything, these kinds of things just cause savvy pirates to purchase 2 separate copies, then compare both files together to see exactly what's changed. Used all the time in those huge movie leaks and catching pirates who release screeners (like the movies they send to judges for award shows): https://torrentfreak.com/replacing-d...irates-190126/ https://torrentfreak.com/oscars-scre...me-low-190226/ Definitely much easier to hide robust watermarks in images/video though... but ebooks? Things like Calibre EPUB->EPUB or MOBI->EPUB conversions can remove a lot of that cruft. |
|||
11-28-2019, 08:53 PM | #29 | |
Guru
Posts: 677
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
I've set Irfanview up as an "open with" program for images in Sigil. So I open any image. Now I press "T" to open the thumbnail viewer, which shows all the images in the temp folder that Sigil has unzipped the images to. Then I can look at the names and images and see if there is a pattern. If there is a sequence of filenames all the same image, I can select them in Sigil's file list and rename them to "f01" which will name them all in a sequence. Then back to Irfanview's thumbnails, press "F5" and it refreshes to show the new names. Keep doing that till I have all the fleurons renamed. Then I look at the images closely, see if they are identical, if not choose a good one to be the unique one, name it "fleuron". Back in Sigil, do a regex s&r to convert all the f\d\d\.jpg to fleuron.jpg. Tools/delete unused media files. Refresh the thumbnail view to see if I got them all. While we're doing fleurons, I use Irfanview to clean them up. I have Photoshop, but Irfanview is simpler and faster. Mostly the fleuron comes as a JPEG, often 24 bit, colour. If it's linework, I rename the file to "Fleuron.gif", then "open with" Irfanview. It complains the format is wrong, I ignore that. Image/Convert to greyscale. If it needs it, "Sharpen". Or Image/Colour corrections and adjust gamma and contrast. Then "Image/Reduce colour depth". 4 colours is usually enough. If there are greys, 16. Or 2 colours if it's really simple, like a box. Just control-Z if it pixellates and use a higher number. Now "Image/Palette/Edit palette" and make sure the "black" is pure black. (RGB 0 0 0), and white is (255 255 255). And you can use F12 to get a very simple painting tools to tidy it up. Now save (not "save as"). Since you've changed the format, in the OPF change media-type="image/jpeg"/ to media-type="image/gif"/ -- I use GIF since it is very compact and lossless, and is compatible with Kindle; convert with Kindlegen and it is unchanged. PNGs get converted sometimes to GIF, or sometimes to JPEG, all larger and usually blurrier than the original. If the fleuron image has a lot of tones, like photo, so better to keep as JPEG. You can use Irfanview's "Options/Lossless crop" to trim it without degrading the image. That will leave a backup image in the temp folder, but Sigil will discard it after you close and reopen the file as it is unmanifested. Or you can refresh Irfan's thumbnails and delete it there. Unifying the dupes not only reduces the epub filesize by often half, it also make editing the file simpler, if you have 100 fewer files to deal with. If there are several images I want to edit I will extract them and then reimport, and I can use Irfanview's batch operations to clean up groups of images (e.g., drop caps) en masse. Last edited by AlanHK; 11-28-2019 at 11:54 PM. |
|
11-29-2019, 07:16 AM | #30 |
Guru
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
Did this reduce the file size by a significant amount?
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question: Coping books between libraries from a plugin | Terisa de morgan | Development | 2 | 10-20-2015 12:46 AM |
Duplicate checking while coping a library | Giuseppe Chillem | Calibre | 2 | 11-29-2011 08:58 AM |
Coping with old books | Iain | Workshop | 10 | 09-21-2010 09:12 AM |
Coping with capacitive buttons | Grimulkan | iRex | 7 | 05-29-2009 07:34 AM |
Coping / synching Plucker config between 2 PCs | FRAC | Reading and Management | 1 | 10-18-2005 05:21 PM |