! See http://factorcode.org/license.txt for BSD license.
USING: accessors combinators.short-circuit http.client
images.loader images.loader.private images.viewer io.pathnames
-kernel present sequences strings urls ;
+kernel namespaces opengl present sequences strings urls ;
IN: images.http
<PRIVATE
: load-http-image ( path -- image )
[ http-get swap content-type ]
[ present file-extension ] bi or
- (image-class) load-image* ;
+ (image-class) load-image*
+ gl-scale-factor get-global [ 2.0 = >>2x? ] when* ;
M: string set-image
dup { [ "http://" head? ] [ "https://" head? ] } 1||