Commit 159ad55d authored by Joel Martin's avatar Joel Martin

Add logo, favicon.

Thanks to Michael Sersen for creating images/Logo.svg.

- Add images directory with original SVG logo, favicon, and some
  derivative PNGs of the logo for different purpose.

- Note that license on images/* is CC BY-SA.

- Add utils/img2js.py to take an image and generate a base64 encoded
  data URI string.

- Add base64 encoded data URI screen logo to display in canvas when
  disconnected.
parent 0f354fb6
......@@ -8,3 +8,7 @@ docs/LICENSE.LGPL-3) with the following exceptions:
include/web-socket-js/ : New BSD license. Source code at
http://github.com/gimite/web-socket-js
images/ : Creative Commons Attribution-ShareAlike
http://creativecommons.org/licenses/by-sa/3.0/
Uses of the work must be attributed
to the noVNC project.
Short Term:
- VNC performance and regression playback suite.
- WebSockets
- expand latency test
- add absolute timers (every 500 packets)
- try 1 ms delay
- stop at 4000 packets
- small and large packets test
- JavaScript
- just base64 decode
- everything except Canvas
- Full test
- Without WebSockets
- With replay from python tester
- add higher-resolution multi test
- websockify test with echo and playback functionality
- choosen by client test page on connect
- Keyboard layout/internationalization support
- convert keyCode into proper charCode
......@@ -24,8 +45,6 @@ Short Term:
Medium Term:
- VNC performance and regression playback suite.
- Viewport support
- Touchscreen testing/support.
images/favicon.ico
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -8,7 +8,7 @@
"use strict";
/*jslint white: false, browser: true, bitwise: false, plusplus: false */
/*global window, WebSocket, Util, Canvas, VNC_native_ws, Base64, DES */
/*global window, Util, Canvas, VNC_native_ws, Base64, DES */
function RFB(conf) {
......@@ -347,6 +347,16 @@ updateState = function(state, statusMsg) {
if (Util.get_logging() !== 'debug') {
canvas.clear();
}
if ((Util.get_logging() !== 'debug') ||
(state === 'loaded')) {
// Show noVNC logo on load and when disconnected if
// debug is off
if (noVNC_logo) {
canvas.resize(noVNC_logo.width, noVNC_logo.height);
canvas.blitStringImage(noVNC_logo.data, 0, 0);
}
}
}
ws.close();
......
......@@ -32,6 +32,7 @@ function get_INCLUDE_URI() {
extra += start + "util.js" + end;
extra += start + "webutil.js" + end;
extra += start + "logo.js" + end;
extra += start + "base64.js" + end;
extra += start + "websock.js" + end;
extra += start + "des.js" + end;
......
#!/usr/bin/python
#
# Convert image to Javascript compatible base64 Data URI
# Copyright 2011 Joel Martin
# Licensed under LGPL version 3 (see docs/LICENSE.LGPL-3)
#
import sys, base64
try:
from PIL import Image
except:
print "python PIL module required (python-imaging package)"
sys.exit(1)
if len(sys.argv) < 3:
print "Usage: %s IMAGE JS_VARIABLE" % sys.argv[0]
sys.exit(1)
fname = sys.argv[1]
var = sys.argv[2]
ext = fname.lower().split('.')[-1]
if ext == "png": mime = "image/png"
elif ext in ["jpg", "jpeg"]: mime = "image/jpeg"
elif ext == "gif": mime = "image/gif"
else:
print "Only PNG, JPEG and GIF images are supported"
sys.exit(1)
uri = "data:%s;base64," % mime
im = Image.open(fname)
w, h = im.size
raw = open(fname).read()
print '%s = {"width": %s, "height": %s, "data": "%s%s"};' % (
var, w, h, uri, base64.b64encode(raw))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment