From 75d6af4be399579e709b49bb244f46651889ae4b Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Wed, 8 Jan 2014 15:37:11 +0100 Subject: Use data: URLs for smileys rather than external files. --- org/madore/damlengine/TodoSmileyElement.java | 3 ++- org/madore/damlengine/images/smileys/arrow.png | Bin 0 -> 234 bytes org/madore/damlengine/images/smileys/biggrin.png | Bin 0 -> 238 bytes org/madore/damlengine/images/smileys/confused.png | Bin 0 -> 227 bytes org/madore/damlengine/images/smileys/cool.png | Bin 0 -> 245 bytes org/madore/damlengine/images/smileys/crazy.png | Bin 0 -> 250 bytes org/madore/damlengine/images/smileys/cry.png | Bin 0 -> 236 bytes org/madore/damlengine/images/smileys/eek.png | Bin 0 -> 238 bytes org/madore/damlengine/images/smileys/evil.png | Bin 0 -> 262 bytes org/madore/damlengine/images/smileys/exclaim.png | Bin 0 -> 292 bytes org/madore/damlengine/images/smileys/frown.png | Bin 0 -> 228 bytes org/madore/damlengine/images/smileys/idea.png | Bin 0 -> 242 bytes org/madore/damlengine/images/smileys/lol.png | Bin 0 -> 243 bytes org/madore/damlengine/images/smileys/mad.png | Bin 0 -> 240 bytes org/madore/damlengine/images/smileys/mrgreen.png | Bin 0 -> 328 bytes org/madore/damlengine/images/smileys/neutral.png | Bin 0 -> 227 bytes org/madore/damlengine/images/smileys/question.png | Bin 0 -> 290 bytes org/madore/damlengine/images/smileys/razz.png | Bin 0 -> 239 bytes org/madore/damlengine/images/smileys/redface.png | Bin 0 -> 242 bytes org/madore/damlengine/images/smileys/rolleyes.png | Bin 0 -> 246 bytes org/madore/damlengine/images/smileys/sad.png | Bin 0 -> 228 bytes org/madore/damlengine/images/smileys/smile.png | Bin 0 -> 239 bytes org/madore/damlengine/images/smileys/surprised.png | Bin 0 -> 237 bytes org/madore/damlengine/images/smileys/twisted.png | Bin 0 -> 267 bytes org/madore/damlengine/images/smileys/wink.png | Bin 0 -> 232 bytes 25 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 org/madore/damlengine/images/smileys/arrow.png create mode 100644 org/madore/damlengine/images/smileys/biggrin.png create mode 100644 org/madore/damlengine/images/smileys/confused.png create mode 100644 org/madore/damlengine/images/smileys/cool.png create mode 100644 org/madore/damlengine/images/smileys/crazy.png create mode 100644 org/madore/damlengine/images/smileys/cry.png create mode 100644 org/madore/damlengine/images/smileys/eek.png create mode 100644 org/madore/damlengine/images/smileys/evil.png create mode 100644 org/madore/damlengine/images/smileys/exclaim.png create mode 100644 org/madore/damlengine/images/smileys/frown.png create mode 100644 org/madore/damlengine/images/smileys/idea.png create mode 100644 org/madore/damlengine/images/smileys/lol.png create mode 100644 org/madore/damlengine/images/smileys/mad.png create mode 100644 org/madore/damlengine/images/smileys/mrgreen.png create mode 100644 org/madore/damlengine/images/smileys/neutral.png create mode 100644 org/madore/damlengine/images/smileys/question.png create mode 100644 org/madore/damlengine/images/smileys/razz.png create mode 100644 org/madore/damlengine/images/smileys/redface.png create mode 100644 org/madore/damlengine/images/smileys/rolleyes.png create mode 100644 org/madore/damlengine/images/smileys/sad.png create mode 100644 org/madore/damlengine/images/smileys/smile.png create mode 100644 org/madore/damlengine/images/smileys/surprised.png create mode 100644 org/madore/damlengine/images/smileys/twisted.png create mode 100644 org/madore/damlengine/images/smileys/wink.png diff --git a/org/madore/damlengine/TodoSmileyElement.java b/org/madore/damlengine/TodoSmileyElement.java index 90f848a..72bb638 100644 --- a/org/madore/damlengine/TodoSmileyElement.java +++ b/org/madore/damlengine/TodoSmileyElement.java @@ -59,7 +59,8 @@ public final class TodoSmileyElement extends TodoDefaultElement { String lang = LangHelper.getLangRec(node); Element img = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "img"); img.setAttributeNS(null, "src", - (ctx.gc.uriToTop==null?"":ctx.gc.uriToTop)+"images/smileys/"+t.emotion+".png"); + "data:image/png;base64," + + Base64.encode(DamlEngine.class.getResourceAsStream("images/smileys/"+t.emotion+".png"))); img.setAttributeNS(null, "class", "smiley"); img.setAttributeNS(null, "alt", t.altText); diff --git a/org/madore/damlengine/images/smileys/arrow.png b/org/madore/damlengine/images/smileys/arrow.png new file mode 100644 index 0000000..e284b02 Binary files /dev/null and b/org/madore/damlengine/images/smileys/arrow.png differ diff --git a/org/madore/damlengine/images/smileys/biggrin.png b/org/madore/damlengine/images/smileys/biggrin.png new file mode 100644 index 0000000..ed79d44 Binary files /dev/null and b/org/madore/damlengine/images/smileys/biggrin.png differ diff --git a/org/madore/damlengine/images/smileys/confused.png b/org/madore/damlengine/images/smileys/confused.png new file mode 100644 index 0000000..6093fe8 Binary files /dev/null and b/org/madore/damlengine/images/smileys/confused.png differ diff --git a/org/madore/damlengine/images/smileys/cool.png b/org/madore/damlengine/images/smileys/cool.png new file mode 100644 index 0000000..32053e4 Binary files /dev/null and b/org/madore/damlengine/images/smileys/cool.png differ diff --git a/org/madore/damlengine/images/smileys/crazy.png b/org/madore/damlengine/images/smileys/crazy.png new file mode 100644 index 0000000..7c4d1be Binary files /dev/null and b/org/madore/damlengine/images/smileys/crazy.png differ diff --git a/org/madore/damlengine/images/smileys/cry.png b/org/madore/damlengine/images/smileys/cry.png new file mode 100644 index 0000000..4c6622d Binary files /dev/null and b/org/madore/damlengine/images/smileys/cry.png differ diff --git a/org/madore/damlengine/images/smileys/eek.png b/org/madore/damlengine/images/smileys/eek.png new file mode 100644 index 0000000..7a4bb22 Binary files /dev/null and b/org/madore/damlengine/images/smileys/eek.png differ diff --git a/org/madore/damlengine/images/smileys/evil.png b/org/madore/damlengine/images/smileys/evil.png new file mode 100644 index 0000000..2a14bd4 Binary files /dev/null and b/org/madore/damlengine/images/smileys/evil.png differ diff --git a/org/madore/damlengine/images/smileys/exclaim.png b/org/madore/damlengine/images/smileys/exclaim.png new file mode 100644 index 0000000..e471afd Binary files /dev/null and b/org/madore/damlengine/images/smileys/exclaim.png differ diff --git a/org/madore/damlengine/images/smileys/frown.png b/org/madore/damlengine/images/smileys/frown.png new file mode 100644 index 0000000..1ecb697 Binary files /dev/null and b/org/madore/damlengine/images/smileys/frown.png differ diff --git a/org/madore/damlengine/images/smileys/idea.png b/org/madore/damlengine/images/smileys/idea.png new file mode 100644 index 0000000..7127458 Binary files /dev/null and b/org/madore/damlengine/images/smileys/idea.png differ diff --git a/org/madore/damlengine/images/smileys/lol.png b/org/madore/damlengine/images/smileys/lol.png new file mode 100644 index 0000000..bad9681 Binary files /dev/null and b/org/madore/damlengine/images/smileys/lol.png differ diff --git a/org/madore/damlengine/images/smileys/mad.png b/org/madore/damlengine/images/smileys/mad.png new file mode 100644 index 0000000..1229a44 Binary files /dev/null and b/org/madore/damlengine/images/smileys/mad.png differ diff --git a/org/madore/damlengine/images/smileys/mrgreen.png b/org/madore/damlengine/images/smileys/mrgreen.png new file mode 100644 index 0000000..8c05def Binary files /dev/null and b/org/madore/damlengine/images/smileys/mrgreen.png differ diff --git a/org/madore/damlengine/images/smileys/neutral.png b/org/madore/damlengine/images/smileys/neutral.png new file mode 100644 index 0000000..4d2483e Binary files /dev/null and b/org/madore/damlengine/images/smileys/neutral.png differ diff --git a/org/madore/damlengine/images/smileys/question.png b/org/madore/damlengine/images/smileys/question.png new file mode 100644 index 0000000..af2585d Binary files /dev/null and b/org/madore/damlengine/images/smileys/question.png differ diff --git a/org/madore/damlengine/images/smileys/razz.png b/org/madore/damlengine/images/smileys/razz.png new file mode 100644 index 0000000..82127ee Binary files /dev/null and b/org/madore/damlengine/images/smileys/razz.png differ diff --git a/org/madore/damlengine/images/smileys/redface.png b/org/madore/damlengine/images/smileys/redface.png new file mode 100644 index 0000000..e4b38bd Binary files /dev/null and b/org/madore/damlengine/images/smileys/redface.png differ diff --git a/org/madore/damlengine/images/smileys/rolleyes.png b/org/madore/damlengine/images/smileys/rolleyes.png new file mode 100644 index 0000000..1314d02 Binary files /dev/null and b/org/madore/damlengine/images/smileys/rolleyes.png differ diff --git a/org/madore/damlengine/images/smileys/sad.png b/org/madore/damlengine/images/smileys/sad.png new file mode 100644 index 0000000..1ecb697 Binary files /dev/null and b/org/madore/damlengine/images/smileys/sad.png differ diff --git a/org/madore/damlengine/images/smileys/smile.png b/org/madore/damlengine/images/smileys/smile.png new file mode 100644 index 0000000..d09436b Binary files /dev/null and b/org/madore/damlengine/images/smileys/smile.png differ diff --git a/org/madore/damlengine/images/smileys/surprised.png b/org/madore/damlengine/images/smileys/surprised.png new file mode 100644 index 0000000..a43b8d6 Binary files /dev/null and b/org/madore/damlengine/images/smileys/surprised.png differ diff --git a/org/madore/damlengine/images/smileys/twisted.png b/org/madore/damlengine/images/smileys/twisted.png new file mode 100644 index 0000000..5f6eed1 Binary files /dev/null and b/org/madore/damlengine/images/smileys/twisted.png differ diff --git a/org/madore/damlengine/images/smileys/wink.png b/org/madore/damlengine/images/smileys/wink.png new file mode 100644 index 0000000..829a80c Binary files /dev/null and b/org/madore/damlengine/images/smileys/wink.png differ -- cgit v1.2.3