streamlet-examples/exiv2
branchv_0
changeset 70 018e2609f5bb
parent 50 22ed5647b235
equal deleted inserted replaced
69:52f837fbb216 70:018e2609f5bb
    66 		# n.b. if file has no exif data, exiv2 exits with error „No Exif data found in the file“ and thus $streamletValid != 0, but there still might be some value like „Image size“
    66 		# n.b. if file has no exif data, exiv2 exits with error „No Exif data found in the file“ and thus $streamletValid != 0, but there still might be some value like „Image size“
    67 		if   [[ ! "x$streamletValid" == "x0" ]] && [[ "x$value" == "x" ]]; then value="";  isNull="true";
    67 		if   [[ ! "x$streamletValid" == "x0" ]] && [[ "x$value" == "x" ]]; then value="";  isNull="true";
    68 		else                                                                               isNull="false";
    68 		else                                                                               isNull="false";
    69 		fi
    69 		fi
    70 
    70 
    71 		if ( [[ "x${streamletFields[$i]}" == "xImage height" ]] || [[ "x${streamletFields[$i]}" == "xImage width" ]] ) && [[ ! "$value" =~ ^[0-9]+$ ]]; then value="0"; isNull="true"; fi
    71 		if ( [[ "x${streamletFields[$i]}" == "xImage height" ]] || [[ "x${streamletFields[$i]}" == "xImage width" ]] ) && [[ ! "$value" =~ ^[0-9]+$ ]]; then isNull="true"; fi
    72 
    72 
    73 		send OUTPUT_ATTRIBUTE "$value"    "$isNull";
    73 		send OUTPUT_ATTRIBUTE "$value"    "$isNull";
    74 	done
    74 	done
    75 	
    75 	
    76 	send WAITING_FOR_INPUT_ATTRIBUTES;
    76 	send WAITING_FOR_INPUT_ATTRIBUTES;