Quote:
Originally Posted by stumped
so I have a book structured like this - where image000r says Chapter 1...
each chapter starts with a h1 tagged image but no text:
<h1 class="calibre10" id="calibre_pb_12"> <a id="_Toc511571660"><img src="../Images/00005.jpeg" alt="" class="calibre11"/></a> </h1>
the next chapter will use images/0006 for chapter 2 etc
|
One thing that makes code less cryptic is to rename the images to something meaningful.
If they are at least numbered in sequence, you can select all the chapter head images in the file list and rename as "Chapter_1" and they will be named in sequence from that. You might use "Chapter_01" to make them sort correctly after renaming if more than 9 chapters.
You could then use a simple regex to grab the image name and insert a "title=\1" tag; and/or "alt=\1" tag for each heading.
If the image names are random, you can use Tools -- Reports -- Images to see them all together and rename them manually; obviously a bit more tedious.
Often though these image titles are not worth the hassle and the bloat they bring to the file. You can replace them with text and maybe a common ornament.
Or if I keep them, I run them through Irfanview's batch convert and convert them from 16 million colour jpegs (as they usually are in retail books) to 4 colour GIFs, usually reducing them by 90% in size; adding a sharpen maybe. Usually indistinguishable, sometimes better, than original.