Adjust-O-Lux v1

From game maps and mods to random artwork and writing, it's the place to be when your not at the coffeeshop or taking a nap!

Adjust-O-Lux v1

Postby BigDXLT » Tue Jun 12, 2007 1:22 pm

This is a little script I slapped together for photoshop. I was getting annoyed with manually resizing and gamma correcting each screenshot of my map (I take lots, though I only ever post a few).

It'll also allow bulk-resizing of any images, so if you take a pile of cameras with your picture and want to downsize them for the web or something, and if you're like me and prefer to do everything you can in photoshop, well, have at. Plus, using photoshops export layers script, it can export all the images to a different file type of your choosing.

Note that "Apply to all images" applies to all the images you have open in Photoshop when you run the script.

It's javascript. Just unzip the file to your photoshop/presets/scripts directory, and load it from inside of photoshop. I've included Photoshop CS's export layers script in case someone is missing it (in case a "overwrite?" type window pops up, you can probably say no if you want.) When you run it, an options menu will pop up. I think it's pretty self-explanatory, but, just see below for more instructions.

It was written with Photoshop CS (aka photoshop 8) in mind.

Figured I'd share it anyway!

Download here!

The documentation wrote:/* Steven "BigD" Derkson's Screenshot Fixer-majig!
Runs on:
Photoshop CS
Intended for:
Natural Selection 3.2 screenshots
Written in:

What it does:
I'll use an example to explain this. Say I've got a whole pile of screenshots to show off my super duper new map.
The thing is, NS doesn't take it's in game over brightening into account when taking a screenshot, and all of the shots are in
that lousy .bmp format in the (likely huge) in game resolution (1024x1280 for example).
Screenshots can look a heckuva lot darker than what you'd see in game. This means that the brightness
needs to be corrected according to the particular maps gamma level (as this value is not even standard across maps in the game)
So, ya open it up in photoshop, go up to image->adjustments->levels and try to remember which value to change.
Then, most screenshots can be HUGE! So, the ability to adjust the size would be nice too. Maybe you wanna do this
for a whole pile of shots, and then export them all to a web-friendly (jpeg/png/gif) format?
So, this script lets you automate an otherwise tedious set of tasks! Hurray!

How to use it (single file):
1. Open the file. Make sure it's the image "on top" if multiple images are open.
2. Run script. Make sure "Apply to all documents" is unchecked if there are multiple images open.
3. Set gamma and size. (Use the value the map is set at! Usually between 1.0 and 2.0)
4. You'll have to manually export the resultant document.

How to use it (multiple files):
1. Close all files that you don't want to change.
2. Open the desired files in photoshop. (Any format)
3. Run script. Ensure "Apply to all documents" is available and checked.
4. Set gamma and size you want for all images.
5. Set "Export files" if you wish to change the format of the images (uses a built-in photoshop script)

Various Notes:
If you use this script on a document with multiple layers, the gamma corrections apply to the ACTIVE layer ONLY!
Also, adjusting it brighter, and then trying to set it back to where it was (dark again) can only be done through the history (Undo).
This is PhotoShop's doing, not mine.

If you utilize images of different sizes, the resizer currently does not allow the modified images to be larger than the ACTIVE document.
This is by design. The idea is, I have one image of a certain size, I want to bring the others to that size, I click on that document,
then run the script. and the rest are all set to that size. Oh my logic here is insane, but that's the way it is damnit!

The export makes COPIES.
You need to MANUALLY reopen the exported files if you wish to work on them further.
And you need to MANUALLY delete the originals if you no longer want them.

There are three options for what to do with the originals after the script is done.
a. They can be closed without saving them. Useful if you're exporting them anyway and want to keep the originals. N/A if not exporting.
b. They can be left open (with the changes). Useful if you're not exporting them or just want to test the script. ;) DEFAULT. Step back through history to remove changes.
or c. They can be closed with the changes saved.

The exporter itself is not my own, it came with PhotoShop CS.
This is a seperate script that will export each layer in a temporary document I create
to a separate file. It is a standalone script, and I expect as much.
If you'd like to create your own exporter all you need for compatibility with mine is to
expect that a document with all the layers (modified images) is the active document.
The script should be found at:
/C/Program Files/Adobe/PhotoShop CS/Presets/Scripts/Export Layers To Files.js
(Unless you're a clever monkey and modify this code! It's at the bottom fyi!)

Todo list:
-Better image sizing rules. (Maximum is currently based on active document.)
-Ability to revert gamma changes? I don't think so Tim.
-Creep more features in! Hurrah!
-GIMP support? :O
Funner then chuckin' rocks at a sign!
User avatar
the First Motorized Sasquatch
the First Motorized Sasquatch
Posts: 4657
Joined: Sun Mar 30, 2003 3:29 am
Location: Fraser Lake, BC

Return to Tool Shed out by the Garden

Who is online

Users browsing this forum: No registered users and 1 guest