annotate bin/get_xml_image.pl @ 1334:55de7223d9a0
draft
minor change collada test file .
author |
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp> |
date |
Wed, 21 Dec 2011 12:34:15 +0900 |
parents |
3e1caef39798 |
children |
|
rev |
line source |
1093
|
1 #!/usr/bin/perl
|
|
2
|
|
3 use MIME::Base64;
|
|
4 my $image;
|
|
5 my $buf;
|
|
6
|
|
7 while(<>) {
|
|
8 if (/<image name="(.*)">/) {
|
|
9 $image= $1;
|
|
10 $buf = '';
|
|
11 } elsif (/<\/image>/ ) {
|
|
12 open(OUT, ">/tmp/$image") ;
|
|
13 print OUT decode_base64($buf);
|
|
14 $image = '';
|
|
15 } elsif ($image) {
|
|
16 $buf .= $_;
|
|
17 }
|
|
18 }
|