Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-26-2019, 06:11 PM   #1
carmenchu
Groupie
carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.
 
Posts: 191
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
What about webp images?

Hello!
Today, making an epub (2) from collected html pages, I found that Sigil put all the webp images into the <misc> folder...

- Of course, webp is a recent format (I have been told that not all servers recognize it as image, zipping it on upload), thus it hardly can been included in the epub2 standard

- On the other hand, I should think that it has a 'mime type' to put it together with jpg, png, gif... and, as a matter of fact, 'preview' shows the images without trouble, although in opf they show as media-type="text/plain"

I would be very grateful to know what is going on

Last edited by carmenchu; 10-26-2019 at 06:27 PM. Reason: Make a correction
carmenchu is offline   Reply With Quote
Old 10-26-2019, 07:53 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,747
Karma: 5706256
Join Date: Nov 2009
Device: many
Check the epub2 and epub3 standards for recognized file types. Epubs are not web pages. The latest is here. webp images are not in the supported core media list.

https://w3c.github.io/publ-epub-revi...epub-spec.html

So even if Sigil added it, it can not be used in epub2 at all and can only be used in epub3 if you specify a fallback resource which I have never actually seen.

I would be happy to add support to webp images to Sigil if you provide references for the proper media-type. But many validators and many existing ebook readers will not support it as it is not a supported core media type even in the latest epub3 spec.

So choosing webp for a epub is probably not a good choice.

Last edited by KevinH; 10-26-2019 at 07:57 PM.
KevinH is online now   Reply With Quote
Advert
Old 10-26-2019, 08:33 PM   #3
carmenchu
Groupie
carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.
 
Posts: 191
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
Media type = image/webp, as per https://en.wikipedia.org/wiki/WebP

As webp offers almost double quality for half the weight than jpg, I am thinking to change the covers of my personal books to that format, besides using them inside.
Inside is not a problem for me, nothwistanding the wrong media type (I read in calibre viewer, and have checked already).
Cover, however, got messed when inserting it in sigil (by hand)...
carmenchu is offline   Reply With Quote
Old 10-26-2019, 08:38 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,747
Karma: 5706256
Join Date: Nov 2009
Device: many
Does it use the file extension.webp or something else. I will add it to the latest branch of Sigil which is now the "nomove" branch.
KevinH is online now   Reply With Quote
Old 10-26-2019, 09:11 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,029
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by carmenchu View Post
Media type = image/webp, as per https://en.wikipedia.org/wiki/WebP

As webp offers almost double quality for half the weight than jpg, I am thinking to change the covers of my personal books to that format, besides using them inside.
Inside is not a problem for me, nothwistanding the wrong media type (I read in calibre viewer, and have checked already).
Cover, however, got messed when inserting it in sigil (by hand)...
Be advised: The Viewers in Sigil and Calibre are VERY FORGIVING and allow things that are valid for WEB pages, but NOT EPUB2 (or 3, which does allow more than 2) Books
theducks is online now   Reply With Quote
Advert
Old 10-26-2019, 11:20 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 45,974
Karma: 168961900
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by carmenchu View Post
Media type = image/webp, as per https://en.wikipedia.org/wiki/WebP

As webp offers almost double quality for half the weight than jpg, I am thinking to change the covers of my personal books to that format, besides using them inside.
Inside is not a problem for me, nothwistanding the wrong media type (I read in calibre viewer, and have checked already).
Cover, however, got messed when inserting it in sigil (by hand)...
For me since I use eInk readers for most of my reading, webp is not an option. As you have already noted, the QT Webengine code used in calibre will not handle WebP consistently including my covers where the SVG wrapper use to simplify my life may be causing issues.

For work, we tried WebP on a couple of webservers and it was a total PITA. We still needed to keep the JPEG, PNG, etc. images for web browsers which did not support WebP and the ~25% compression increase still left us chewing up server hard drives like we got them for free. Even now 5 years later, we run about 15% of browsers that do not support WebP. And the supported browsers are a of a weird mix to support since we have to detect browsers that support lossy WebP, browsers that support lossless and lossy WebP with alpha support and browsers that support WebP animation.

I do wonder about the claim of double quality for 50% of the file size. In our testing, we found ~25% better compression for WebP lossy compared to JPEG. This was going for the same visual quality from DSLR produced raw format images. When we tried maximum quality, the difference between WebP and JPEG was pretty close to 3% which is negligible when we had to support both formats. The test done by Google using random images skimmed from the web showed about the same 25% reduction in file size compared to those produced by Re-JPEG when negative compression gains were allowed with an attempt to maintain a PSNR of ~42.
DNSB is offline   Reply With Quote
Old 10-27-2019, 01:27 AM   #7
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by carmenchu View Post
Today, making an epub (2) from collected html pages, I found that Sigil put all the webp images into the <misc> folder...
As others have stated:

Anything outside of GIF, JPG, PNG, SVG... isn't going to be supported (if at all):

https://www.w3.org/publishing/epub32...-cmt-supported

... and especially in the case of EPUB2 readers.

Quote:
Originally Posted by carmenchu View Post
As webp offers almost double quality for half the weight than jpg, I am thinking to change the covers of my personal books to that format, besides using them inside.
Conversion from a lossy format to another lossy format is rarely a good idea. You're going to introduce even more artifacting.

Best to only convert to lossy WEBP if you're going from a lossless source (like PNG).

Quote:
Originally Posted by DNSB View Post
I do wonder about the claim of double quality for 50% of the file size. In our testing, we found ~25% better compression for WebP lossy compared to JPEG.
JPG is also notorious for blocking, ringing, and banding, where WEBP has much less of those types of artifacts (these newer algorithms tend to get smoother/fuzzier instead).

These two are some of the better image comparison sites I've run across:

https://wyohknott.github.io/image-formats-comparison/
https://people.xiph.org/~tdaede/av1stilldemo/

WEBP is definitely the most well-supported post-JPG format, and it's great that so many browsers now have support for it. (Ebooks, not so much!)

Although if pure compression is your goal, there's newer image formats beyond WEBP (although browser support is non-existent).
  • HEIC = based on HEVC (next generation MPEG format)
    • This is the format latest iPhones save photos in.
  • AVIF = based on AV1 (next generation video encoding).
    • AV1 is the format a huge portion of the video industry is getting behind, since it's open and royalty free.
    • The tools aren't really there yet to easily create these types of images.

Complete Compression Side Note: I recently noticed a checkbox in GIMP's Save As JPG called arithmetic coding. Turns out this is/was a way to implement instant 10% savings on all JPGs, but it was mired in patents. By the time the patents expired (only relatively recently), every single tool/browser/everything has since moved on, and has nearly 0 support for such JPGs.

Quote:
Originally Posted by DNSB View Post
For work, we tried WebP on a couple of webservers and it was a total PITA. We still needed to keep the JPEG, PNG, etc. images for web browsers which did not support WebP and the ~25% compression increase still left us chewing up server hard drives like we got them for free.
Yep, sacrificing hard drive space for (potentially) very large bandwidth savings.

Seems like it would be the yet-another-format implemented at the server-level, then serve whichever format the device supports best.

And like I mentioned above, the types of artifacting in these newer formats is better than JPG's blockiness.

Last edited by Tex2002ans; 10-27-2019 at 01:32 AM.
Tex2002ans is offline   Reply With Quote
Old 10-27-2019, 03:22 AM   #8
carmenchu
Groupie
carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.
 
Posts: 191
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
Quote:
Originally Posted by Tex2002ans View Post
As others have stated:


JPG is also notorious for blocking, ringing, and banding, where WEBP has much less of those types of artifacts (these newer algorithms tend to get smoother/fuzzier instead)..
Yes--that's just my point!
I use to do my own covers in Gimp, usually to follow the first edition one, if available, cleaned up from blocking/scratches/blurb. Which implies putting brand new text.
Alas! jpg comes out full of artifacts around said text edges (inside and out)--even with no subsampling and quality 85, which together keep the image size aceptable for my (wholly personal) standards.
Lossless png hasn't that problem, but size soars up out of limits, and indexed png is great for lineal maps/plans, but not for multicolored, smooth backgrounds.

So--Many thanks, Kevin, for adding webp support to sigil--another reason for looking forward to the new release.

Last edited by carmenchu; 10-27-2019 at 03:22 AM. Reason: repeated word
carmenchu is offline   Reply With Quote
Old 10-27-2019, 03:29 AM   #9
carmenchu
Groupie
carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.
 
Posts: 191
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
Yes--extension .webp--and thanks again!
carmenchu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove background images from pdfs? perhaps all images? MarjaE PDF 2 10-17-2018 03:30 PM
How to change the Sigil Images folder name to images davidspring Sigil 29 02-12-2018 05:00 AM
Aura Comic cbr with WebP images matteo.piccioni Kobo Reader 8 04-08-2017 09:23 AM
HTML + Images = MOBI without Images SunLight Amazon Kindle 5 08-25-2012 02:27 PM


All times are GMT -4. The time now is 05:22 PM.


MobileRead.com is a privately owned, operated and funded community.