Photoshop scripting. Opening & Saving overlapping image stacks - javascript

I’ve been getting more and more into star photography and have recently been trying to develop a new style of stacking the photos and creating time-lapse videos from the stacked photos.
Example: http://www.youtube.com/watch?v=eBE3vUb-dtE
This process took absolutely forever to accomplish and I’ve been trying my hardest to write a script to help me automate the process. Each frame is a stack of up to 25 images, then the next frame is an overlapping stack of images, only offset by 1 or 2 photos.
Can anyone please assist me is writing a Photoshop script to accomplish the following?
After taking my time-lapse photos, I am left with a single folder with an image sequence of anywhere between 50 & 1800 photos.
Ideal Setup:
1) Open Photoshop and run a script “Stacked Timelapse”
2) A Dialog box prompts me for the Source ImageSequence folder. It also prompts me for the maximum length of the stacked star trails (Max number of images to stack per frame).
Ideally it would have some text with recommended settings.
For example:
“0-299 images = Recommended Length of 25”
“300-599 images = Recommended length of 40”
“600+ images = Recommended length of 60”
3) Once you click GO, the script will begin importing the photos into a Stack, applying the ‘.blendMode = BlendMode.LIGHTEN;” to all the layers, then save to a new subfolder (we can call it “Stack”) with the filenames “0001.jpg, 0002.jpg, 0003.jpg, etc” (using max jpg quality settings)
To accomplish the effect in the video, you have to follow this image quantity and offset.
https://dl.dropboxusercontent.com/u/50801/StarFileStructure.jpg
Can anyone give me some pointers on how to script and accomplish this?
Thanks in advance!

As a starting point, you should look at the source code for the Load Files into Stack, Merge to HDR Pro or Photomerge features. These are partially implemented in ExtendScript, and the script's source code is provided as part of the Photoshop release. I think their basic operation is similar to what you're trying to accomplish. Load Files into Stack is probably the simplest one to start with.
The source code to these files is found in:
Photoshop_App_Folder/Presets/Scripts/
Load Files into Stack.jsx
Photomerge.jsx
Merge to HDR.jsx
Stack Scripts Only/
CreateImageStack.jsx
StackSupport.jsx
where Photoshop_App_Folder is C:\Program Files\Adobe\Adobe Photoshop CSn on Windows and /Applications/Adobe Photoshop CSn on the Mac.
These features use a library of code in the sub-folder Stack Scripts Only/ to do the basic tasks of managing the UI and loading the photo files into a layered document.
This stuff is not uncomplicated, but looking at these scripts gives you working examples to use as a starting point. Also, if you're not familiar with the Extendscript Toolkit, I would start learning about it first. It's the IDE used to develop scripts for Photoshop and other Creative Suite apps.

Related

Getting a list of images on web page with image size

I frequently have to do optimization tasks on websites, and I typically start with very large images ( Example 2mb ) and go from there. Pingdom speed test use to allow you to sort by images and size but now prevent this. Does anyone know if there is a website or a console script I can run to give me a simple list of every image on a webpage along with how large that image is?
I searched for this but can't find much because most people are looking for dimensions of an image and not size.

Assets very slow to load in GatsbyJS project (Netlify hosted)

I'm working on my first GatsbyJS project (and hosted on Netlify) and over the past few weeks have noticed that everything is very speedy during development, but when built and hosted the pages are very slow to load (particularly the images).
This is a very simple marketing site (just 6 or so pages with a few images per page), so I figured I must be doing something wrong since Gatsby is said to be "blazing-fast", and that is definitely not my experience in prod. The landing page currently takes ~40sec to load, and is only a few images and a nav bar.
I'm loading images fairly simply per the docs, but is there some optimization step that I should also be doing? Or storing assets in a particular location for Gatsby to optimize?
Most recent build: https://musing-goldstine-2f7024.netlify.com/
Thanks for any info!
With Netlify you can now go to the site you wish to optimize, then: Site settings > Build & deploy > Post processing.
I turned them all on and they seem to work perfectly with my GatsbyJS site, including image optimization.
The issue is that you are serving scaled images. A scaled image is an image that has been scaled to match the size that it is displayed.
For example, on this page:
This cityscape is resized in HTML or CSS from 3840x1200 to 1366x600. Serving a scaled image could save 5.0MiB (82% reduction).
To track this: open Chrome Developer tools (CMD + OPT + I) on Mac
Navigate to network tab, CMD + R to refresh
You can sort by size, load time, etc.
Chrome Developer Tools Network Tab on this site
Another good site to analyze your page speed:
https://gtmetrix.com/
To improve page load time:
Use a photo editor (Photoshop, GIMP, etc) and resize the photo dimensions down to the maximum display size.
After resize, compress images to improve page load time further.
Resources for compressing images:
NPM package such as sharp
Command line tool: ImageMagick
In Browser: Optimizilla
Image Optimization Guidelines
Google Page Speed Recommendations for Optimizing Images
Final step: Replace your unoptimized images with your newly optimized images. You should see a drastic improvement in page load time.

Flickity carousel images are not loaded completely

I am currently using the Flickity library to display corousels on my wordpress site.
The problem: When the site produkte is loaded the first time a lot of images get not loaded fully but only the first centimeter.
I am happy for any hints regarding this problem.
Kind regards
Lukas
1) Optimize images using Photoshop or below url and then upload in word press
or add image optimizer api in your word press website
https://kraken.io/web-interface
2) Minify CSS
3) Leverage browser caching for the cacheables
4) Minify HTML
cross check with https://gtmetrix.com/ too
hope this will help and boost website performance
Best luck
The most improvement you can get is to optimise the image size to make them as small as possible. Use this online service to reduce image sizes.
https://tinypng.com/
You can also install a plugin like Smush to optimise images automatically when they are uploaded.
https://wordpress.org/plugins/wp-smushit/
Also to reduce image sizes in the future you can install this plugin to ensure files of excessive size are resized.
https://wordpress.org/plugins/imsanity/
Once you have done this then you can use a caching plugin to speed up you site's overall performance.

Image Slider Effect that respond to mouse movement

I'm looking for a way to implement image effect like the one seen in this website -> http://62models.com/ Is there any existing libraries or can somebody point mo to a right direction for adding this to a web page.
In the development toolbar (Hotkey: F12) on the network tab you can see the files that are loaded when you browse at the site.
I looked through them and found main.min.js which included multiple banners from different javascript libraries. Looking them up I think the page uses PixiJS and StackBoxBlur. (Not sure if imagesLoaded is used.)
FYI: It is always a nice try to load the unminified source, but in this case
main.js doesn't help much.
(My 2 cents: The effect looks nice, but is worthless on touchscreens and is not implemented well for smaller screen width.)

Efficient jQuery or HTML5 image slider

I have a friend that is making a portfolio site. He has some high res images that he would like to display. There will be multiple projects on one page, and several images per project. Because of this, he would like to reduce load time as much as possible, and also conserve system memory usage. That being said, he's afraid that a conventional jQuery slider will eat up too much memory if it's called multiple times on the same page. Also, to load all of the images at initialization is just not an option as this would create long load times. Does anyone know of any image sliders, either jQuery or HTML5, or both that can help with this?
before spending time searching for a good jQuery slider...
...start from the basis:
start following general web design best practices like theese
keep your web page under 100 KB and load fast ? (the more is less the more is better)
use CDN (Content Delivery Network) to store HD images.
load HD images only on-demand, do not preload them.
use compressed, converted (avoid png) and resized images to fit the slider container.
do not scale images with CSS or inline CSS. (neither server side)
make use of the Lazy loading design pattern. (if as you say there are lots of images and the page is going to be very long)

Categories