how to include Images?

how to include Images?

in API Development

Posted by: Lycan.8327

Lycan.8327

Q:

Hi guys, I’m not sure if I am missing something but since starting on API development in a nodeJs app recently, I’ve not been able to manage getting images to work. I would love it if someone could please point me to resources that show/explain how images are retrieved and how to display them?

from what I can gather, there’s a server which i should be connecting to? I’m still learning Js and using the API.

also is there currently (or future plans) to be able to display our character image in some form on the site?

thanks a lot! I apologise if this has been asked already, I just can’t seem to understand it!

how to include Images?

in API Development

Posted by: Lawton Campbell

Lawton Campbell

Web Programmer

Next

A:

I don’t know of any tutorials, unfortunately.

For guild emblems, I’ve got a rendering example. For rendering maps from the tile service, there’s Cliff’s old example (which handles the overworld map) and mine which renders WvW objectives (there’s also the wiki documentation).

For skill icons, you’ll find the icon URLs in /v2/skills; for inventory/bank icons I think they’re in /v2/files, but there’s never enough stuff in there.

Model renders are still at least a year out — the rendering bits are all tied to the engine, which requires a window context (which is not currently possible since all the servers run headless).

how to include Images?

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Hi guys, I’m not sure if I am missing something but since starting on API development in a nodeJs app recently, I’ve not been able to manage getting images to work. I would love it if someone could please point me to resources that show/explain how images are retrieved and how to display them?

What images in particular are you looking to retrieve? Most v2 endpoints that have icons/images have the fully qualified URL. For the v1 endpoints that return icon_file_id and icon_file_signature, the URL can be constructed via “https://render.guildwars2.com/file/$icon_file_signature/$icon_file_id.png”.

also is there currently (or future plans) to be able to display our character image in some form on the site?

There are plans but it’s more of a personal wish upon a star at this point. I basically need to integrate a software renderer into the game engine, then lift only the parts responsible for rendering into a server. I’m not really a server programmer nor do I know anything about graphics programming, so it’s like a six-month project for me that I don’t know when I’ll have time for.

It would be amazing though.

how to include Images?

in API Development

Posted by: Lycan.8327

Lycan.8327

What images in particular are you looking to retrieve? Most v2 endpoints that have icons/images have the fully qualified URL. For the v1 endpoints that return icon_file_id and icon_file_signature, the URL can be constructed via “https://render.guildwars2.com/file/$icon_file_signature/$icon_file_id.png”.

My apologies fot a tardy reply! Is there a tutorial that I could look at to implement this? I would love to see some images on my project! With regards to the types of images, I believe it is those that you have correctly identified, namely guild emblems, skill, inventory and bank icons etc. which have predefined endpoints given already.

I was wondering though, how this extends to the maps? I can see the Map output in JSON, so does this get converted to images? I’m very much a novice when it comes to these things and am learning as I go along so any resources for this would be fantastic!

While it is wishful thinking at the moment regarding the character model implementation at this stage, I am still very happy with the level of support the API gives.

many thanks in advance!

how to include Images?

in API Development

Posted by: Lycan.8327

Lycan.8327

Thanks very much Lawton, that’s very helpful indeed!