Fixed GIF detection stuff
This commit is contained in:
parent
7cf9bcca4e
commit
4a4822851f
2 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ class GlobeWorker : public Napi::AsyncWorker {
|
||||||
overlay.read("./assets/images/sphere_overlay.png");
|
overlay.read("./assets/images/sphere_overlay.png");
|
||||||
coalesceImages(&coalesced, frames.begin(), frames.end());
|
coalesceImages(&coalesced, frames.begin(), frames.end());
|
||||||
|
|
||||||
if (type != "GIF") {
|
if (type != "gif") {
|
||||||
list <Image>::iterator it = coalesced.begin();
|
list <Image>::iterator it = coalesced.begin();
|
||||||
for (int i = 0; i < 29; ++i) {
|
for (int i = 0; i < 29; ++i) {
|
||||||
coalesced.push_back(*it);
|
coalesced.push_back(*it);
|
||||||
|
@ -45,7 +45,7 @@ class GlobeWorker : public Napi::AsyncWorker {
|
||||||
optimizeTransparency(mid.begin(), mid.end());
|
optimizeTransparency(mid.begin(), mid.end());
|
||||||
if (delay != 0) {
|
if (delay != 0) {
|
||||||
for_each(mid.begin(), mid.end(), animationDelayImage(delay));
|
for_each(mid.begin(), mid.end(), animationDelayImage(delay));
|
||||||
} else if (type != "GIF") {
|
} else if (type != "gif") {
|
||||||
for_each(mid.begin(), mid.end(), animationDelayImage(5));
|
for_each(mid.begin(), mid.end(), animationDelayImage(5));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ class SpinWorker : public Napi::AsyncWorker {
|
||||||
readImages(&frames, in_path);
|
readImages(&frames, in_path);
|
||||||
coalesceImages(&coalesced, frames.begin(), frames.end());
|
coalesceImages(&coalesced, frames.begin(), frames.end());
|
||||||
|
|
||||||
if (type != "GIF") {
|
if (type != "gif") {
|
||||||
list <Image>::iterator it = coalesced.begin();
|
list <Image>::iterator it = coalesced.begin();
|
||||||
for (int i = 0; i < 29; ++i) {
|
for (int i = 0; i < 29; ++i) {
|
||||||
coalesced.push_back(*it);
|
coalesced.push_back(*it);
|
||||||
|
@ -39,7 +39,7 @@ class SpinWorker : public Napi::AsyncWorker {
|
||||||
optimizeTransparency(mid.begin(), mid.end());
|
optimizeTransparency(mid.begin(), mid.end());
|
||||||
if (delay != 0) {
|
if (delay != 0) {
|
||||||
for_each(mid.begin(), mid.end(), animationDelayImage(delay));
|
for_each(mid.begin(), mid.end(), animationDelayImage(delay));
|
||||||
} else if (type != "GIF") {
|
} else if (type != "gif") {
|
||||||
for_each(mid.begin(), mid.end(), animationDelayImage(5));
|
for_each(mid.begin(), mid.end(), animationDelayImage(5));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue