Nikon Picture Controls showcasing
Starting from NikonPC preview (one by one), I made a little script to automate:
- selection of a single picture control
- downloading the modified preview image
Target is a gallery with ALL the previews in order to choose the preferred/best one for the photo.
Two methods: one to update the preview, another one to force a file download.
The Script
function updatePreview(index) { js('imgPreview').onReady('onLoad', function() { curve.init(); curve.initPreviewImage(); var elmFileList = js('selFileList').elm; if (!elmFileList) { console.log("elmFileList " + index); return false } elmFileList.selectedIndex = index; var src = this.elm.src; this.elm = new Image(); js(this.elm).addEvent('load', function() { npc.load(); forceDownload(index); }, false); this.elm.src = src; }); } function forceDownload(index) { var link = document.createElement('a'); link.href = $("#cLutImage")[0].toDataURL("image/png"); link.download = 'Download' + index + '.png'; document.body.appendChild(link); link.click(); } function main(index) { updatePreview(index); }
How to launch:
- Open https://nikonpc.com/
- Press F12
- Inside JS Console
- Paste the above code
- input main(X), where X is an available Picture Control in the page. i.e. main(4)
- press Enter
- DownloadX.png modified file will be downloaded