-
-
Notifications
You must be signed in to change notification settings - Fork 53
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 Illustrations scale #937
Comments
@rgaudin Totaly in favour of fixing this quickly, but what would be the concrete use case (just linking an issue here is enough)? @veloman-yunkan Doable easily? |
Use case is displaying graphics correctly on devices which screen has higher density of pixels.
The devicePixelRatio is reported by the device (hence its name) and informs web browsers' media queries. Main usage is to toggle which bitmap image gets displayed based on the end-user's screen (to avoid auto up-scaling or down-scaling). In our case, the illustration is currently a single The idea behind our scale param is to store for example another illustration sourced from This can be circumvented of course by storing Also, given |
On Retina displays, having illustrations adapted to the DPR 2 is a big game changer in terms of look and feel. Anything not adapted really looks blurry since everything else is adapted to the Retina DPR of 2, and most eyes (not all of course) are able to see the difference. From my experience, most people don't know about the technical details, but they can feel something is awkward / broken when only DPR 1 is available. Strongly in favor of implementing this quickly, of course, as everything related to the look and feel of Kiwix / openZIM. |
@benoit74 @rgaudin @veloman-yunkan I wonder if we should limit or standardize the possible values for the "dpr" argument. AFAIK the HTML/CSS engine can deal with whatever values given, but still it might be a good idea to not allow anything and for example limit to the 1, 2 or 3 values? |
Readers/users will have to implement some matching code anyway since devicePixelRatio is a float (even though it often returns an int). |
No strong opinion |
While developing libzim7, we updated the spec to introduce Illustrations which are metadata for which dimensions and scale are stored as part of the metadata entry path.
We decided then that we wanted to store a scale so applications dont have to re-implement this on their own.
Unfortunately, to cut some corners and reach the release, we decided that libzim implementation will be deferred as the urgent need what supporting the favicon scenario through illustrations and that required a single size and scale.
To this day, it is still not possible to neither store nor retrieve an illustration at a scale other than
1
(~~ via the Illustration API)libzim/src/writer/creator.cpp
Lines 191 to 195 in cdcbb6c
libzim/src/archive.cpp
Lines 157 to 159 in cdcbb6c
I would now want to see this implemented.
The text was updated successfully, but these errors were encountered: