Open agmmnn opened 1 year ago
Is this something I could do without any knowledge of coding?
Is this something I could do without any knowledge of coding?
Yes ofc. Open your terminal and:
npm install -g fineartdown
fineartdown <url>
thats it.
If you don't have npm(Node.js) you can google how to install it. If you need any help, you can ask. @zdillingham
Thanks so much. I just tried and I got the below error. Any tips on what I might be doing wrong?
npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /usr/local/lib/node_modules/fineartdown npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/fineartdown' npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/fineartdown'] { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/usr/local/lib/node_modules/fineartdown' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.
I tried reinstalling with homebrew and got the below errors:
npm ERR! code 1
npm ERR! path /opt/homebrew/Cellar/node/19.8.0/lib/node_modules/fineartdown/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build --update-binary
npm ERR! Failed to execute '/opt/homebrew/Cellar/node/19.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/opt/homebrew/Cellar/node/19.8.0/lib/node_modules/fineartdown/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/opt/homebrew/Cellar/node/19.8.0/lib/node_modules/fineartdown/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v111' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.10
npm ERR! node-pre-gyp info using node@19.8.0 | darwin | arm64
npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.0/canvas-v2.11.0-node-v111-darwin-unknown-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.0/canvas-v2.11.0-node-v111-darwin-unknown-arm64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas@2.11.0 and node@19.8.0 (node-v111 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.0/canvas-v2.11.0-node-v111-darwin-unknown-arm64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@19.8.0 | darwin | arm64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@19.8.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v19.8.0/node-v19.8.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v19.8.0/node-v19.8.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v19.8.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v19.8.0/SHASUMS256.txt
npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/opt/homebrew/Cellar/node/19.8.0/lib/node_modules/fineartdown/node_modules/canvas/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/zacharyzimmerman/Library/Caches/node-gyp/19.8.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/zacharyzimmerman/Library/Caches/node-gyp/19.8.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/zacharyzimmerman/Library/Caches/node-gyp/19.8.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/opt/homebrew/Cellar/node/19.8.0/lib/node_modules/fineartdown/node_modules/canvas',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! /bin/sh: pkg-config: command not found
npm ERR! gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp
failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:325:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:512:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 22.2.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/19.8.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--update-binary" "--module=/opt/homebrew/Cellar/node/19.8.0/lib/node_modules/fineartdown/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/opt/homebrew/Cellar/node/19.8.0/lib/node_modules/fineartdown/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v111"
npm ERR! gyp ERR! cwd /opt/homebrew/Cellar/node/19.8.0/lib/node_modules/fineartdown/node_modules/canvas
npm ERR! gyp ERR! node -v v19.8.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/opt/homebrew/Cellar/node/19.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/opt/homebrew/Cellar/node/19.8.0/lib/node_modules/fineartdown/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/opt/homebrew/Cellar/node/19.8.0/lib/node_modules/fineartdown/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v111' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.
npm ERR! A complete log of this run can be found in: npm ERR! /Users/zacharyzimmerman/.npm/_logs/2023-03-15T21_44_59_438Z-debug-0.log
@zdillingham can you try this: https://stackoverflow.com/a/47766862
sudo npm install -g fineartdown --unsafe-perm=true --allow-root
Okay I did that and got this message: zacharyzimmerman@zacharys-mbp-6 ~ % sudo npm install -g eslint --unsafe-perm=true --allow-root
added 97 packages in 375ms
22 packages are looking for funding
run npm fund
for details
I then tried installing fineartdown and got this message:
npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /Users/zacharyzimmerman/.npm-global/lib/node_modules/fineartdown npm ERR! errno -13 npm ERR! npm ERR! Your cache folder contains root-owned files, due to a bug in npm ERR! previous versions of npm which has since been addressed. npm ERR! npm ERR! To permanently fix this problem, please run: npm ERR! sudo chown -R 501:20 "/Users/zacharyzimmerman/.npm"
npm ERR! A complete log of this run can be found in: npm ERR! /Users/zacharyzimmerman/.npm/_logs/2023-03-15T22_17_01_104Z-debug-0.log
I then ran sudo chown -R 501:20 "/Users/zacharyzimmerman/.npm" to fix the problem but nothing happened
This is not a problem with the package but system-related, probably the error message you are getting indicates a permission issue. Try the commands in this thread and try to install again, https://stackoverflow.com/a/18414606 I can't test it because I don't have a mac with me. 🤷♂️
sudo chown -R "/Users/zacharyzimmerman/.npm"
Thanks for all your help. I got this when running usage: sudo chown -R "/Users/zacharyzimmerman/.npm"
chown [-fhnvx] [-R [-H | -L | -P]] owner[:group] file ... chown [-fhnvx] [-R [-H | -L | -P]] :group file ...
Still cant get it to work.
I have windows installed on this mac so maybe ill try it there.
I did attempt to install on my PC and got the below error:
C:\Users\zacharyzimmerman>npm install -g fineartdown
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\Users\zacharyzimmerman\AppData\Roaming\npm\node_modules\fineartdown\node_modules',
npm WARN cleanup [Error: EPERM: operation not permitted, lstat 'C:\Users\zacharyzimmerman\AppData\Roaming\npm\node_modules\fineartdown\node_modules\concat-map\index.js'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'lstat',
npm WARN cleanup path: 'C:\Users\zacharyzimmerman\AppData\Roaming\npm\node_modules\fineartdown\node_modules\concat-map\index.js'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\zacharyzimmerman\AppData\Roaming\npm\node_modules\fineartdown\node_modules\canvas
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build --update-binary
npm ERR! Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --update-binary --module=C:\Users\zacharyzimmerman\AppData\Roaming\npm\node_modules\fineartdown\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\zacharyzimmerman\AppData\Roaming\npm\node_modules\fineartdown\node_modules\canvas\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.10
npm ERR! node-pre-gyp info using node@18.15.0 | win32 | ia32
npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.0/canvas-v2.11.0-node-v108-win32-unknown-ia32.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.0/canvas-v2.11.0-node-v108-win32-unknown-ia32.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas@2.11.0 and node@18.15.0 (node-v108 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.0/canvas-v2.11.0-node-v108-win32-unknown-ia32.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@18.15.0 | win32 | ia32
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@18.15.0 | win32 | ia32
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if Python is C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python39\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python39\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python39-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python38\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python38\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python38-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python37\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python37\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python37-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python36\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python36\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python36-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\zacharyzimmerman\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if the py launcher can be used to find Python 3
npm ERR! gyp ERR! find Python - "py.exe" is not in PATH or produced an error
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python **
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack at PythonFinder.fail (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:330:47)
npm ERR! gyp ERR! stack at PythonFinder.runChecks (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:159:21)
npm ERR! gyp ERR! stack at PythonFinder.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\zacharyzimmerman\AppData\Local\npm-cache_logs\2023-03-15T22_51_30_526Z-debug-0.log
I added the executable files, try it. This is my last hope :) https://github.com/agmmnn/fineartdown#usage
@zdillingham
Thanks. I tried it but got this error: zsh: parse error near `\n'
How do you "Open your terminal in the path where the executable file is located."?
Hi, I was able to get it installed but just so I have clarification this program just helps download the individual squares and does not piece together the final image. Is that correct? I would then need to piece together in photoshop or another program?
Hi, I was able to get it installed but just so I have clarification this program just helps download the individual squares and does not piece together the final image. Is that correct? I would then need to piece together in photoshop or another program?
No, it's supposed to merge at the end. The final merged image is "artworkidcanvas[tilesizes].png"
You can run it again where the tile folder is and it will create the final image. It will not download the already downloaded tiles. @zdillingham
Weirdly the tile folder appears but not the final image. Terminal says that it was completed and a PNG was created but I cannot find it even by searching artworkidcanvas[tilesizes].png. See attached screenshot.
I figured it out! Thanks!
Support: Fine Art America, Conde Nast Store, Photos.com and Pixels.com
I've been trying to figure out Fine Art America's image view/tile system for a few days and this is what I came up with.
https://github.com/agmmnn/fineartdown
I don't know if it can be adapted to Dezoomify. Because the server allows a certain request in a certain time. It is needed to combine 3 layers in canvas. A download can take 5-10 minutes.
Usage
.\fineartdown-[your-os] <url>
From npm
Or run locally:
How it works?
The backend server sends a 10% smaller slice of the requested tile with 10% upscale.
So we need 3 layers to fill most of the gaps between the tiles. [layer1, layer2, layer3]
A 4th layer can be added, but this requires more requests to the server. And the server does not return the image more than a certain number of requests in a certain period of time. This time we have to put a delay between each download, which makes the total process longer. Using different proxy ip's can be a solution.
[540, 600, 667] = [(600*0.9),600,(600/0.9)] : Disadvantages: Need to upscale 600px->667px. So much float numbers in backend and gap numbers. Advantages: Less tiles=less requests to the server.
[486, 540, 600] = [((600*0.9)*0.9),(600*0.9),600] : I've tried many combinations and this is the best one so far.
Known Problems:
Gaps Between Tiles:
There are still gaps between tiles. Because 3 layers cannot cover the whole picture. As I mentioned before, adding the 4th layer takes a lot of time. Different layer sizes or different image sizes create different patterns.
This can be solved with the Healing Brush Tool in Photoshop.
Limited Request to Server
The server sends the content "---" instead of the image after a certain number of requests within a certain period of time. Therefore, I added a rule to the download function that if it fails, it retries after a certain delay. That's why it takes longer to download an image.
Results
Related Issues:
https://github.com/lovasoa/dezoomify/issues/267, https://github.com/lovasoa/dezoomify/issues/601, https://github.com/lovasoa/dezoomify/issues/604, https://github.com/lovasoa/dezoomify/issues/693, https://github.com/lovasoa/dezoomify/issues/267, https://github.com/lovasoa/dezoomify/issues/692