Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Rebol Programming/load-image

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

USAGE: LOAD-IMAGE image-file /update /clear DESCRIPTION: Load an image through an in-memory image cache. LOAD-IMAGE is a function value. ARGUMENTS: image-file -- Local file or remote URL (Type: file url) REFINEMENTS: /update -- Force update from source site /clear -- Purge the entire cache SOURCE CODE load-image: func [ "Load an image through an in-memory image cache." image-file [file! url!] "Local file or remote URL" /update "Force update from source site" /clear "Purge the entire cache" /local image image-cache ][ image-cache: [] if clear [system/words/clear image-cache recycle] if any [update not image: select image-cache image-file] [ if all [update image] [remove/part find image-cache image-file 2] repend image-cache [ image-file image: either file? image-file [load image-file] [ either update [load-thru/binary/update image-file] [load-thru/binary image-file] ] ] ] image ]