View Single Post
Old 12-14-2019, 12:56 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,355
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Be careful when substituting - sometimes the book creator uses png for a specific reason, eg. .png can have transparent backgrounds so the image works with whatever color background the user selects, while jpg does not.

Code:
- you will need to do the conversion from .png to .jpg using your favorite image 
software/process and put them in an accessible location/folder

- open the epub file manually: 
  -- rename the file from yourfilename.epub to yourfilename.zip
  -- open the zip file, find the image files and delete
     (sometimes they are located in: ../OEBPS/Images/)
  -- copy the new/changed images to that folder
  -- rename the file back to an .epub extension

 - OR -

- you can accomplish this step using Sigil by multi-selecting all the files you 
  want to delete (ctrl-click or shift-click) in the Book Browser Pane then hitting
  the delete key. Then using the "add existing files" button (plus sign on the 
  toolbar, or Insert/File on the menu, or Ctrl-shift-I) then multi-select all the
  images you wish to add then selecting "open"

- Once the images are in your epub use your editor of choice (Sigil or Calibre Editor
  are excellent, free, editors) to change the file reference in the html:
  -- search for something like: Images/(.*?).png"
  -- replace with something like: Images/\1.jpg"
You should definitely do this on a backup copy of your book, and I would recommend iterating through one at a time (replace/find instead of replace all).

Last edited by Turtle91; 12-14-2019 at 01:13 PM.
Turtle91 is offline   Reply With Quote