Psycojoker / prosopopee

a static website generator to make beautiful customizable pictures galleries that tell a story
http://prosopopee.readthedocs.org
GNU General Public License v3.0
323 stars 55 forks source link

Add a new gm setting to allow progressive JPEG #61

Closed 0x010C closed 8 years ago

0x010C commented 8 years ago

I've added a new gm setting to offer the opportunity to convert all the JPEG files from the standard baseline loading to progressive. This doesn't affect the file size (or just reduce it very slightly, nothing extraordinary), but give the illusion that the picture loads faster by having quickly a first preview of it (which improve the user experience when using a slow connection). For more details on progressive JPEG, this blog post is quite interesting : http://yuiblog.com/blog/2008/12/05/imageopt-4/

Psycojoker commented 8 years ago

Hello,

That's a great coincidence, a friend of us just wrote a (french) blogpost about using progressive JPEG and we wanted to include that into prosopopee and you just did it :)!

According to gm manpage, your documentation is slightly inaccurate (missing information):

Use Line to create an interlaced PNG or  GIF or progressive JPEG image.

Except if you think that's a bad idea, I would turn this option to True by default as it only brings positive value.

According to (frenhc) http://sebsauvage.net/rhaa/index.php?2013/07/30/14/35/17-grosses-images-et-petits-debits to handle progressive jpeg on background css element we should generate and specify multiple images size to have a similar result (but that might be outside of the scope of this PR).

Thanks for your contribution :)

0x010C commented 8 years ago

You're right, I've toogled the default value to True. I also added the information about PNG/GIF files in the doc.

I've just made some tests, and indeed they are loading problems with background images as described with slow connections even with progressive JPEG (tested on firefox48). Imho this is an other issue which requires further reflection (which size for the temporary image? A fixed or relative one? ...).

And btw, this isn't coincidence, I've read the same blog post this morning ;)

Psycojoker commented 8 years ago

I've just made some tests, and indeed they are loading problems with background images as described with slow connections even with progressive JPEG (tested on firefox48). Imho this is an other issue which requires further reflection (which size for the temporary image? A fixed or relative one? ...).

Yes, that also requires some test since we could also generate several intermediate size pictures very easily to have a smooth loading but it's hard to guess without any real test.

Ideally we should also generate several css entries using media queries to offer several various size images for background: for specific screens size.

Anyway, thanks a lot for your contribution :)