View Full Version : Best graphics formats?


MacEachaidh
05-16-2013, 10:59 AM
Do ebook readers generally support SVG format?

I generally stick with JPG, but how safe would I be with PNG or SVG?

RbnJrg
05-16-2013, 11:51 AM
Do ebook readers generally support SVG format?


Hi MacEachaidh;

I think the following post can help you:

http://www.mobileread.com/forums/showpost.php?p=590355&postcount=44

Of course, you can play with the atributes "widht", "height" "viewBox" and "preserveAspectRatio" :)


I generally stick with JPG, but how safe would I be with PNG or SVG?

Personally, I didn't have problems with them in .epub and .kf8 format.

Regards
Rubén

MacEachaidh
05-16-2013, 02:16 PM
Hi Rubén
Thanks for the link, very useful indeed. But I was genuinely asking about SVG. ;)

DaleDe
05-16-2013, 03:25 PM
SVG is required for ePub 2 according to the specification. In practice it seems to be available in most readers.

Dale

Turtle91
05-16-2013, 04:11 PM
SVG is required for ePub 2 according to the specification. In practice it seems to be available in most readers.

Dale

Just for clarification - 'cuz I was confused...and figured someone else might be too! :o

The specification requires all ePub2 compliant devices to support the SVG format - most of them do. This does not mean YOU are required to use SVG in your ePub.

DaleDe
05-16-2013, 04:59 PM
Just for clarification - 'cuz I was confused...and figured someone else might be too! :o

The specification requires all ePub2 compliant devices to support the SVG format - most of them do. This does not mean YOU are required to use SVG in your ePub.

Exactly you are not required to put pictures in your files. You are not required to put anything in the files but if something is present it needs to conform to the standard.

Dale

Toxaris
05-17-2013, 01:59 AM
Also be aware that not the full spec of SVG is supported. Some things will not work. What should be supported is in the specifications at IDPF.
Most of the basic stuff will work.

dwig
05-17-2013, 05:32 PM
Do ebook readers generally support SVG format?

I generally stick with JPG, but how safe would I be with PNG or SVG?

It really depends on the image.

JPEG is an excellent format to use for photographic images that include a full range of tones and colors. It is not at its best when used for simple line art.

SVG is good for line art but can't do photographic images other than being a container for a JPEG or PNG. It is a vector format (SVG = Small Vector Graphic) and not a bitmap format.

PNG is an extremely plastic format and as a result most (>90%) of the info you'll find on this site is inaccurate due to omissions in the discussion (generally, things are claimed for the PNG format overall when they only apply to a few of the many ways a PNG can be built). PNG can use a wide range of bit depths and can use a variety of compression methods (lossy JPEG-like, lossless, and none). As a result, if you use the right tool to create the PNG and make the right choices in generating the final PNG it can be as good as any other bitmat format for almost any use. At low bit depths and with a lossless or no compression it can deliver compact clean line art in much the same was as the GIF format can. At high bit depths (e.g. 24bit) it can do excellent photographic images which can be compressed rather well if you choose the compression settings wisely.

FunkeXMix
05-21-2013, 11:09 PM
I would add that GIF could be preferable over PNG if you are going to make a ePub and Kindle version. KindleGen converts PNG to GIF. If you manually optimize your line art to reduce file size I think GIF would be ideal so KindleGen won't do any re-optimizing on it.

Jellby
05-22-2013, 03:17 AM
But GIF supports only 256 (indexed) colors and 1-bit transparency, while PNG supports full 24-bit colors and 8-bit transparency (which means partially transparent pixels). So, if those features are important, stick to PNG.

Besides, I seem to remember the ePub spec supports PNG but not GIF.

mrmikel
05-22-2013, 07:18 AM
Us old timers are less familiar with PNG and remember wondering if it were still going to be around... Gotta look at the settings, since most of my PNGs that come into epubs are gigantic, so need to be resaved. Irfanview should be able bulk convert them down to something less gigantic.

Jellby
05-22-2013, 08:39 AM
Of course, if you save a photograph as a PNG, it will be gigantic, but it will probably be lossless. PNG is good for the things GIF is good, only it's better :D

DaleDe
05-22-2013, 10:44 AM
Of course, if you save a photograph as a PNG, it will be gigantic, but it will probably be lossless. PNG is good for the things GIF is good, only it's better :D

But it is a lot more complicated. Lots of options to how a PNG file is built.

Jellby
05-22-2013, 02:12 PM
But it is a lot more complicated. Lots of options to how a PNG file is built.

In Gimp I just uncheck every option and set it to maximum compression (see image). I don't think that's too complicated.

http://www.saunalahti.fi/pesonpa/images/GIMP_Save_as_PNG_Default_options.png

DaleDe
05-22-2013, 02:26 PM
I wonder if Gimp is using the fully expanded true color table in the style of jpg or the mapped color table pallet in the style of gif. And if mapped how many bits it is using for the map.

Dale

Jellby
05-23-2013, 11:53 AM
Depends on the Mode settings you have in the image (RGB, Grayscale, indexed). It will not (as far as I know) change it when saving.