+ in = (r instanceof XWT.Blessing) ? ((XWT.Blessing)r).getImage() : Stream.getInputStream(r);
+ } catch (IOException e) {
+ Log.error(Picture.class, r);
+ } catch (JSExn e) {
+ Log.error(Picture.class, r);
+ }
+
+ // could not find image
+ if (in == null) { Log.info(Picture.class, "couldn't load image for resource " + r); return; }
+
+ try {
+ PushbackInputStream pbis = new PushbackInputStream(in);