awslabs / aws-icons-for-plantuml

PlantUML sprites, macros, and other includes for Amazon Web Services services and resources
Other
887 stars 149 forks source link

Can we add the GraphQL icon to the overall set? #59

Closed mikematthewscharter closed 1 year ago

mikematthewscharter commented 1 year ago

or are there instructions for how we could do it ourselves?

hakanson commented 1 year ago

Since this isn't an AWS created icon, it isn't a logical fit for this icon set.

For an instructions on how to create your own, take a look at how S3 Upload Workflow uses $UserIMG() to display an image.

rectangle "$UserIMG()\nUser" as user

See User.puml to learn how $UserIMG() is defined to return a base64 encoded image:

!function $UserIMG($scale=1)
!return "<img data:image/png;base64,iVBOR...Jggg=={scale="+$scale+"}>"
!endfunction

You can use similar code to define your own $GraphQLIMG(). Assuming you have a graphql.png, you can run base64 -i graphql.png to get the base64 encoding.

mikematthewscharter commented 1 year ago

How is the sprite $User [64x64/16z] {... created?

hakanson commented 1 year ago

Take a look at https://github.com/awslabs/aws-icons-for-plantuml/blob/main/scripts/awsicons/icon.py#L202 - basically a call to the plantuml-mit-1.2023.1.jar

java -jar -Djava.awt.headless=true plantuml-mit-1.2023.1.jar -encodesprite 16z file.png

mikematthewscharter commented 1 year ago

Thank you. This helps a ton!