aboutsummaryrefslogtreecommitdiff
path: root/image.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'image.tcl')
-rw-r--r--image.tcl15
1 files changed, 15 insertions, 0 deletions
diff --git a/image.tcl b/image.tcl
new file mode 100644
index 0000000..7f4f22c
--- /dev/null
+++ b/image.tcl
@@ -0,0 +1,15 @@
+
+namespace eval ::moonlib::image:: {
+}
+
+proc ::moonlib::image::configure {obj_id img filename} {
+ if { [catch {$img configure -file $filename} fid]} {
+ ::pdwindow::logpost $obj_id 1 "[image]: error reading '$filename':\n$fid\n"
+ }
+}
+
+proc ::moonlib::image::create_photo {obj_id img filename} {
+ if { [catch {image create photo $img -file $filename} fid]} {
+ ::pdwindow::logpost $obj_id 1 "[image]: error reading '$filename':\n$fid\n"
+ }
+}