asciidoctor / asciidoctor-diagram

:left_right_arrow: Asciidoctor diagram extension, with support for AsciiToSVG, BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag), Ditaa, Erd, GraphViz, Mermaid, Msc, PlantUML, Shaape, SvgBob, Syntrax, UMLet, Vega, Vega-Lite and WaveDrom.
http://asciidoctor.org
MIT License
435 stars 106 forks source link

Sprites do not generate with transparency #361

Closed leehambley closed 3 years ago

leehambley commented 3 years ago

When generating sprites from PNGs with an alpha channel the background color becomes white. Manually fixing the Fs to 0s in the sprite indicates that at least, in theory sprites can support transparency, but the --encodesprite option doesn't seem to generate them correctly, note this graphic (screenshot of the preview on Gnome and the actual graphic are attached)

image Oauth_logo svg

(graphic source is the PNG on Wikipedia for OAauth2 and Firefox (latest's) "save as..." option which saves the SVG as a PNG.

I'm running the sprite generation thusly:

$ docker run --rm -v $(pwd):/sprites:Z -ti "ourcontainer:latest" /bin/sh
# java -jar ./plantuml.jar -encodesprite 16z /sprites/rest.png
Dockerfile cat Dockerfile # Copied from https://github.com/vearutop/docker_plantuml/blob/master/Dockerfile # who apparently does not publish to DockerHub FROM openjdk:17-jdk-alpine3.14 ENV PLANTUML_VERSION=1.2021.9 ENV LANG en_US.UTF-8 RUN \ apk add --no-cache graphviz-dev wget ca-certificates ttf-dejavu fontconfig && \ wget "http://downloads.sourceforge.net/project/plantuml/${PLANTUML_VERSION}/plantuml.${PLANTUML_VERSION}.jar" -O plantuml.jar && \ apk del wget ca-certificates RUN ["java", "-Djava.awt.headless=true", "-jar", "/plantuml.jar", "-version"] RUN ["dot", "-version"] # Entrypoints disabled # ENTRYPOINT ["java", "-Djava.awt.headless=true", "-jar", "/plantuml.jar"] # CMD ["--help"]%
pepijnve commented 3 years ago

If I'm reading this correctly, you're reporting a PlantUML issue. That's something you should discuss with the developers of that project. Not sure where their issue tracker is, but you could try asking in http://forum.plantuml.net

leehambley commented 3 years ago

sorry @pepijnve totally wrong tab :facepalm: thanks