Automatic Image Naming

This commit is contained in:
Chinmay Pandhare
2017-07-10 18:53:37 +05:30
parent 1bc3ce2ecc
commit fc7821feb2
3 changed files with 14 additions and 4 deletions

View File

@@ -159,6 +159,8 @@ Methods can be chained on the Image Sequencer:
* run() can not be in the middle of the chain.
* If the chain starts with loadImage() or loadImages(), the following methods are
applied only to the newly loaded images.
* If no name is provided to the image, a name will be generated for it. The name will
be of the form "image<number>". For ex: "image1", "image2", "image3", etc.
Valid Chains:
```js

View File

@@ -34684,8 +34684,12 @@ function formatInput(args,format,images) {
}
}
else if (format[0] == "o_string" && format_i == "l" && args.length == 2) {
if (typeof(args[0]) == "string")
args.splice(0,0,"default");
if (typeof(args[0]) == "string") {
identifier = "image";
number = 1;
while (this.images.hasOwnProperty(identifier+number)) number++;
args.splice(0,0,identifier+number);
}
}
if(args.length == format.length) {

View File

@@ -88,8 +88,12 @@ function formatInput(args,format,images) {
}
}
else if (format[0] == "o_string" && format_i == "l" && args.length == 2) {
if (typeof(args[0]) == "string")
args.splice(0,0,"default");
if (typeof(args[0]) == "string") {
identifier = "image";
number = 1;
while (this.images.hasOwnProperty(identifier+number)) number++;
args.splice(0,0,identifier+number);
}
}
if(args.length == format.length) {