a bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2026-10-11 04:11:31 +03:00
parent 75b09823eb
commit 054c5a2d2e
4 changed files with 39 additions and 35 deletions

View File

@ -458,19 +458,16 @@ var DataPrototype = {
//
// NOTE: only the first occurrence is kept...
// NOTE: this is slow-ish...
removeDuplicates: function(lst, skip_undefined){
skip_undefined =
skip_undefined == null ?
true
: skip_undefined
var lst_idx = lst.toKeys()
for(var i=0; i < lst.length; i++){
if(skip_undefined
&& lst[i] == null){
continue }
if(lst_idx[lst[i]] != i){
lst.splice(i, 1)
i -= 1 } }
removeDuplicates: function(lst, skip_undefined=true){
if(skip_undefined){
var lst_idx = lst.toKeys()
for(var i=lst.length-1; i >= 0 ; i--){
if(lst[i] == null){
continue }
if(lst_idx[lst[i]] != i){
lst.splice(i, 1) } }
} else {
lst.splice(0, lst.length, ...(new Set(lst))) }
return lst },
// List of sparse image set names...

View File

@ -151,14 +151,13 @@
}
},
"node_modules/@electron/rebuild": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-4.0.1.tgz",
"integrity": "sha512-iMGXb6Ib7H/Q3v+BKZJoETgF9g6KMNZVbsO4b7Dmpgb5qTFqyFTzqW9F3TOSHdybv2vKYKzSS9OiZL+dcJb+1Q==",
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-4.0.2.tgz",
"integrity": "sha512-8iZWVPvOpCdIc5Pj5udQV3PeO7liJVC7BBUSizl1HCfP7ZxYc9Kqz0c3PDNj2HQ5cQfJ5JaBeJIYKPjAvLn2Rg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@malept/cross-spawn-promise": "^2.0.0",
"chalk": "^4.0.0",
"debug": "^4.1.1",
"detect-libc": "^2.0.1",
"got": "^11.7.0",
@ -907,9 +906,9 @@
}
},
"node_modules/@types/node": {
"version": "22.19.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.1.tgz",
"integrity": "sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ==",
"version": "22.19.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.3.tgz",
"integrity": "sha512-1N9SBnWYOJTrNZCdh/yJE+t910Y128BoyY+zBLWhL3r0TYzlTmFdXrPwHL9DyFZmlEXNQQolTZh3KHV31QDhyA==",
"license": "MIT",
"dependencies": {
"undici-types": "~6.21.0"
@ -1594,9 +1593,9 @@
"license": "MIT"
},
"node_modules/electron": {
"version": "37.10.2",
"resolved": "https://registry.npmjs.org/electron/-/electron-37.10.2.tgz",
"integrity": "sha512-7TOA9WVO8jFKvkWMJPkSmQxV68TJEPa8bh4AYykKYuUcsezxsbZUpEH8MgEHH/orJhpbaO77XIC/+40lMkTlEg==",
"version": "37.10.3",
"resolved": "https://registry.npmjs.org/electron/-/electron-37.10.3.tgz",
"integrity": "sha512-3IjCGSjQmH50IbW2PFveaTzK+KwcFX9PEhE7KXb9v5IT8cLAiryAN7qezm/XzODhDRlLu0xKG1j8xWBtZ/bx/g==",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@ -1710,9 +1709,9 @@
"license": "MIT"
},
"node_modules/exifreader": {
"version": "4.32.0",
"resolved": "https://registry.npmjs.org/exifreader/-/exifreader-4.32.0.tgz",
"integrity": "sha512-sj1PzjpaPwSE/2MeUqoAYcfc2u7AZOGSby0FzmAkB4jjeCXgDryxzVgMwV+tJKGIkGdWkkWiUWoLSJoPHJ6V5Q==",
"version": "4.33.1",
"resolved": "https://registry.npmjs.org/exifreader/-/exifreader-4.33.1.tgz",
"integrity": "sha512-KsVc4bRfZW255PSst5Opt5jUeLp+SD2+q6fmXQkMMkphpFCDBFjzNAvswgQa1YcMrXq+9Na6HJ6gS3wo2x7RRw==",
"hasInstallScript": true,
"license": "MPL-2.0",
"optionalDependencies": {
@ -2944,10 +2943,10 @@
}
},
"node_modules/path-scurry/node_modules/lru-cache": {
"version": "11.2.2",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz",
"integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==",
"license": "ISC",
"version": "11.2.4",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz",
"integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==",
"license": "BlueOak-1.0.0",
"engines": {
"node": "20 || >=22"
}
@ -3091,9 +3090,9 @@
}
},
"node_modules/requirejs": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.7.tgz",
"integrity": "sha512-DouTG8T1WanGok6Qjg2SXuCMzszOo0eHeH9hDZ5Y4x8Je+9JB38HdTLT4/VA8OaUhBa0JPVHJ0pyBkM1z+pDsw==",
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.8.tgz",
"integrity": "sha512-7/cTSLOdYkNBNJcDMWf+luFvMriVm7eYxp4BcFCsAX0wF421Vyce5SXP17c+Jd5otXKGNehIonFlyQXSowL6Mw==",
"license": "MIT",
"bin": {
"r_js": "bin/r.js",

View File

@ -1,7 +1,7 @@
{
"name": "ImageGrid.Viewer.g4",
"main": "index.html",
"version": "4.0.13a",
"version": "4.0.14a",
"author": "Alex A. Naanou <alex.nanou@gmail.com> (https://github.com/flynx)",
"contributors": [],
"repository": "github:flynx/ImageGrid",

View File

@ -17,6 +17,7 @@ FPS=${FPS:-8}
# XXX ffmpeg does not seem to support extglob...
#PATTERN=${PATTERN:-'*.@(JPG|jpg|JPEG|jpeg|PNG|png)'}
PATTERN=${PATTERN:-'*.jpeg'}
ANIM_EXT=.gif
while [[ $# != 0 ]] ; do
case "$1" in
@ -28,6 +29,7 @@ while [[ $# != 0 ]] ; do
echo " -r --rate FPS - set framerate (default: $FPS)"
echo " -p --pattern PATTERN"
echo " - image pattern to use (default: '$PATTERN')"
echo " --apng - use .apng instead of .gif (experimental)"
echo
echo "NOTE: option defaults can bbe overriden by coresponding env variables."
echo
@ -43,6 +45,12 @@ while [[ $# != 0 ]] ; do
shift 2
continue
;;
--apng)
# XXX do we need to do the palette dance here???
ANIM_EXT=.apng
shift
continue
;;
# trailing args...
*)
@ -83,7 +91,7 @@ PALETTE=${PALETTE:-.palette.png}
-i $PATTERN \
-i "$PALETTE" \
-filter_complex paletteuse=dither=none \
"${NAME}".gif
"${NAME}${ANIM_EXT}"
# cleanup...
@ rm "$PALETTE"