Skip to content
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

Simplify icon uploading #5

Closed
diversys opened this issue Mar 30, 2015 · 2 comments
Closed

Simplify icon uploading #5

diversys opened this issue Mar 30, 2015 · 2 comments
Assignees

Comments

@diversys
Copy link
Contributor

Currently, one has to upload 3 icons which is not very convenient to say the least.
Ideally, only one HVIF or PNG icon should be needed.

@andponlin
Copy link
Collaborator

I can probably do something about a single PNG upload with in-memory scaling and I will look into that idea. HVIF is a bit more tricky server-side as I am not able to render those in java or on linux without writing a native renderer for the file-format --- Not out of the question, but quite a bit of work at this stage.

Another approach is for somebody to write a small Haiku-native tool or application that were able to read an HVIF and use the JSON-RPC API to write the icons to the HDS application server. This approach would mean that not only were the HVIF vector icons populated, but also high-quality bitmap native renders of the HVIF including the appropriate detail levels for the icon sizes using the native renderer.

For anybody interested, the API you are looking for is PkgApi#configurePkgIcon(..). You can find out more about using the API by looking at the PDF documentation which may have moved --- ask on the mailing list for a recent build if that link is broken. You will also need your user authorized to do this and there is a development/test deployment to work on. Please feel free to ask on the mailing list for help.

@andponlin andponlin self-assigned this Mar 30, 2015
@andponlin
Copy link
Collaborator

Mailed to the mailing list 14-APR-2015. I haven't heard back so I hope somebody will be able to look into this at some stage desktop-side;

Issue #5 [1] requests a better icon-upload workflow. It would be really nice if HDS could consume an HVIF and would then produce bitmap data at various sizes as necessary. I had a brief look at the C++ code that renders the HVIF to see how hard it would be to render the HVIF into a Java Graphics context, but (as noted on the ticket) I think this is the wrong way to approach the problem. Better would be to write a native Haiku tool that accepted an HVIF or extracted an HVIF, rendered the PNGs and uploaded the HVIF and bitmaps to HDS.

If others agree that this would be a better approach, I will close this ticket and hopefully somebody will have some time to work on that at some point. I am happy to provide help / pointers from the HDS side and don't forget there's a test deployment to develop against!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants