MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Where are epub images stored? (https://www.mobileread.com/forums/showthread.php?t=68317)

janneman 01-05-2010 04:49 AM

Where are epub images stored?
 
I have an epub file which contains some pages with a (full-page) image.

I want to get the image and open them in an image editor so i can crop the borders. Then reinsert the image in the epub.

How can i do this?

In code it looks like this:
Code:

<img class="calibre1" src="../images/img0016.png" />
I read somewhere that the ../images/img0016.png is just a temporary file and folder that sigil uses.

But i can not find this temporary folder (or the original image). Any ideas?

Thanks!

pdurrant 01-05-2010 07:13 AM

Quote:

Originally Posted by janneman (Post 725118)
I have an epub file which contains some pages with a (full-page) image.

I want to get the image and open them in an image editor so i can crop the borders. Then reinsert the image in the epub.

Change the .epub extension to .zip. Then unzip. Find the image in the unzipped folder, edit it, save in the same place and name, and re-zip (using a proper epub zipping method - e.g. my applescript, if you're on Macintosh), and change the extension back to .epub.

Valloric 01-05-2010 09:33 AM

Quote:

Originally Posted by janneman (Post 725118)
I want to get the image and open them in an image editor so i can crop the borders. Then reinsert the image in the epub.

How can i do this?

This will be very easy to do in 0.2.0, where you'll be able to right click on an image in the Book Browser and open it in an external editor.

But right now, this is a bit difficult. Pdurrant gave a very good and simple way of doing this.

The image files are located in the "<SigilTempFolder>/scratchpad/<BookUUIDFolder>/OEBPS/images". The path to "<SigilTempFolder>" is "<UserHomeFolder>/My Documents/Sigil" on Windows and "<UserHomeFolder>/.Sigil" on Unices like Mac OS X and Linux (notice the dot in the folder name). The next version of Sigil will use "<UserHomeFolder>/Sigil" (no dot) on Windows.

Do be very careful if you're editing the files in the book's folder. If you screw something up, you could crash Sigil. You're not really meant to mess around in that temp folder.

janneman 01-06-2010 05:43 AM

:thanks:

thanks pdurrant for your description. This method seems to work.

I used JPEGCrops 0.7.5b to crop the images; http://ekot.dk/programmer/JPEGCrops/
-freeware (for private use)
- goes pretty fast
- you can also rotate pictures

and also thanks to Valloric for the additional info.


Time to do some reading now ...


All times are GMT -4. The time now is 06:37 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.