-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support the BPG image format #185
Comments
aw this is really cool ;-) |
Except that almost nobody has collections in that format :D . I think this would be most useful as a format for thumbnails, but it won't happen before ownCloud uses PHP7 as the minimum version of PHP... |
Let's see what the GD team has to say about it :) |
Can it use the JavaScript version as a fallback when libbpg is not available? |
I suppose you're talking about using it for thumbnails in core, but unfortunately, it wouldn't work. I could create an app which would only work with that format, but it would only work with Gallery and would mean having 2 copies of each thumbnail, one in PNG and one in BPG. So currently, the only thing we can do is show BPG images and let users convert their collections using their favourite tools. |
I don't want ownCloud to convert pictures, I just want to save storage and traffic by using BPGs which I provide.
|
Since there is not a single browser supporting BGP, the app would need to always decode files. |
|
Why no JavaScript source code for the decoder? It's probably this: https://github.com/mirrorer/libbpg/blob/master/post.js . It probably requires some Emscripten and friends to complile... Here is example of using |
Yes, that's the one. There is no need to compile it as it provides a |
Preliminary analysisI did some testing and it's a not easy to work with. We would need our own decoders since the methods available are too rigid and since we would need to add our own. PNGs - 16 pictures - 36.1MB - GD resizing116 requests - 3.9MB - 5.5sBPG - 18 pictures - 1.5MB - Browser resizing116 requests - 4.5MB - 8.5sBPG - 18 pictures - 1.5MB - Hermite algo resizing116 requests - 4.5MB - 10sI did not enable asset pipe-lining in the tests, so you could probably shave off 4s to the loading time, which means that you get from 1.5s with PNGs to 6s with BPG with a resizing algorithm and that's with only 18 pictures... |
Things to test:
|
This issue was moved to nextcloud/gallery#36 |
Introduction
BPG (Better Portable Graphics) is a new image format. Its purpose is to replace the JPEG image format when quality or file size is an issue. Its main advantages are:
Source: http://bellard.org/bpg/
Converters
Plan
After a preliminary analysis, I concluded that it would not be too difficult to add support to ownCloud via the Gallery app, but the use cases are quite limited at the moment, since mobile browsers would not be able to show the images.
image/bpg
to the list of core media types Adding BPG media type core#17206Avenues to explore
Advantages
Caveats
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: