1 | #!yab
|
---|
2 |
|
---|
3 | doc Place a description of your
|
---|
4 | doc program here.
|
---|
5 | doc
|
---|
6 | doc Author, date, license
|
---|
7 |
|
---|
8 |
|
---|
9 |
|
---|
10 | args=peek("argument")
|
---|
11 | if args<>1 usage()
|
---|
12 | arg$=peek$("argument")
|
---|
13 | Bitmap$="temp"
|
---|
14 | ErrCode = BITMAP IMAGE arg$, Bitmap$
|
---|
15 | ht=(BITMAP GET Bitmap$, "height")+1
|
---|
16 | wd= (BITMAP GET Bitmap$, "width")+1
|
---|
17 | print "ht "+str$(ht)+" wd "+str$(wd)
|
---|
18 | //ATTRIBUTE SET "Int", "Media:Width", str$(wd), arg$
|
---|
19 | //ATTRIBUTE SET "Int", "Media:Height", str$(ht), arg$
|
---|
20 | system("addattr -t int32 Media:Width "+str$(wd)+" "+arg$)
|
---|
21 | system("addattr -t int32 Media:Height "+str$(ht)+" "+arg$)
|
---|
22 |
|
---|
23 | end
|
---|
24 |
|
---|
25 | sub usage()
|
---|
26 |
|
---|
27 | print "msize by Jim Saxton"
|
---|
28 | print "Usage"
|
---|
29 |
|
---|
30 | print "msize filename"
|
---|
31 | print "This sets the media width and media height attributes"
|
---|
32 | print "and prints ht media height, wd media width"
|
---|
33 | exit
|
---|
34 | end sub
|
---|
35 |
|
---|