Some of you have probably seen my
recent galleries of decensored works in multiple languages. I've been doing this with a script I wrote and thought I'd share, some people have expressed interest. After all, the more decensored galleries, the better. If an English version of a gallery has been decensored, there's no reason why the Japanese, Chinese, Korean, and Spanish versions shouldn't be decensored as well,
if the decensor can be copied quickly - which it can, using this tool. (tl;dr, it lets you do [
reasoningtheory.net]
this, at that speed)
(Don't worry, you don't need to know the first thing about decensoring to use this! But you do need to have a bit of software/programming intuition)
The script is written in AutoHotkey (in Windows), and uses Photoshop. I am using Windows 7 and Photoshop CS6. It
probably works on other versions of Windows and other versions of Photoshop too, but if it doesn't, it should be pretty easy to fix by making a few minor changes to the AHK script. This being AHK based, it
will unfortunately likely have some compatibility problems depending on the layout of windows on your screen, but it's worth it if you want to be able to copy decensors quickly.
(1) How copying a decensor works:If you don't know already,
manually, the process of copying a decensor involves something similar to the following:
(*) Find a decensored version of a gallery and a censored version of the gallery in a different language.The versions should use the same source/scan, without any cropping differences. This way, the decensored pixels can be copied to the same location on the censored gallery. They don't necessarily need to be the same resolution as long as the aspect ratios match. Example: This decensored gallery uses 975 x 1400 while this censored gallery uses 1114 x 1600, but they're based on the same scan and have the same aspect ratio, so if the larger image is downscaled, they'll match up perfectly, and the decensor can be copied. (You can also upscale the smaller image, but that usually looks worse) On the other hand, this decensored version uses cropping different from this censored version, so copying the decensor quickly would be too difficult, requiring you to manually orient/crop/align every page. If the versions use the same page dimensions but are leveled differently, it's still OK: example, [decensored] + [censored, overleveled] = [decensored, overleveled]
(*) For each page in the gallery:- Open the censored page and the decensored page.
- If any page uses Indexed color, convert its (Image => Mode) to RGB color or to Grayscale so you can use the clone stamp.
- If leveling is different, level the lighter version to match the darker version.
- If one page is larger than the other, change the dimensions (Image => Image Size) so they match.
- Using the clone stamp tool, on the decensored gallery, select an exact source point (alt-click)
- Make a new empty layer on the censored gallery
- On the censored gallery, at the same exact point, click to set the clone stamp's destination. Now you can "paint" areas of the decensored gallery onto the censored gallery
- Paint over all censored areas with the clone stamp to copy the decensor. If you find that the colors don't match up exactly, which they often don't, use lower hardness so the decensored area blends in with the censored page.
- Save the newly decensored page, close both Photoshop tabs
- Repeat for all pages
Upload the new pages. You're done.
Manually, much of your time will be spent opening pages, setting them up, precisely lining up the clone stamp, and saving, and only a moderate fraction of time will be spent actually painting the decensor. What my script does is it automates everything in the page loop above
except painting the decensor, which you still have to do manually. This means a lot more of your time will be spent productively, rather than on overhead.
(2) Example use of the script:I was looking at the galleries and found a
decensored one and decided to copy it to the
Japanese version after making sure the pages [
reasoningtheory.net]
matched up.
After downloading the archives, I put them in separate directories and renamed the files so they would come up in order in Windows Explorer. (this is essential so that pressing the down arrow selects the next image in the sequence for each folder - I recommend Bulk Rename Utility). I make another directory for the finished images and copy into it the first few images (with no censorship) from the censored gallery. Select [
reasoningtheory.net]
the first censored page in each folder and open Photoshop. (everything up to here are the obvious steps any editor would make regardless) Now the magic happens. In Photoshop, I press the hotkey for AHK.
Here's the video: [
reasoningtheory.net]
https://reasoningtheory.net/decensoring/decensoring.webm (This is in real time, it's not sped up)
I first tell the script the target (censored) directory by activating that window, and then I tell the script the source (uncensored) directory. Then, it opens the current selected page in each folder, makes a new layer, gets the clone stamp source from the uncensored page, pastes it onto the censored page, and undos (this way the stamp gets lined up without anything new being painted). All the user has to do is paint the decensor - once that's done, it'll save to the finished folder. The script takes care of everything but the actual painting - this lets me finish each page in a matter of seconds rather than a minute or more. Now I have a new decensored gallery done in a small fraction of the time it would have taken otherwise!
The result: [
English decensored] + [
Japanese censored] = [
Japanese decensored]
(3) Details / Howto:Installation details:
The AutoHotkey software is able to send keystrokes, mouse clicks, and so on to Windows programs; my script takes care of the tedious repetitive tasks involved in opening and setting up each page. Install [
autohotkey.com]
Autohotkey 1.1, then download my script [
reasoningtheory.net]
Decensoring.ahk (you can view the code text) and double click it. An icon will appear in your taskbar: this means the script is ready for you to press the hotkey while in Photoshop. Optional: If you want to be able to automatically level one or both of the pages, [
creativemarket.com]
install the Photoshop Action Set [
reasoningtheory.net]
Decensoring.atn (it's just that one leveling action)
Usage details:
Before activating the hotkey in photoshop, check the true/false settings at the top of the script (right click the icon and Edit).
Set targetIndexed to True if the target (censored) gallery's images need to be converted from indexed color (so you can use Clone Stamp). Same for sourceIndexed (for the uncensored gallery's images). Set levelTarget to true if you need to level the target (censored) gallery before pasting on the decensor so contrast matches; same for levelSource Adjust the leveling amount through the Photoshop Actions pane.
The script will automatically detect image dimensions and downscale the larger image if necessary. If you want to upscale the smaller image instead, set doUpscale to true.
If you change any of the settings, you need to Reload the script before the changes take effect (right click the icon, Reload).
After you open Photoshop, you might open a random image and then close it, just so photoshop loads all its resources into memory. The script is designed to run
fast, so delays of a fraction of a second can create problems.
Adobe Photoshop should be at the top of your "Open With" list when right clicking on an image file: if it isn't, you'll have to add an extra "send {down}" or few to the script to simulate down-arrow key presses.
With Photoshop active, press
capslock and then
G to activate the script. It will prompt you for the folder you're copying
onto (the censored gallery). Alt-tab to that folder and press
capslock again. Then it'll prompt you for the folder you're copying
from (the uncensored gallery). Alt-tab to that folder and press
capslock. Now you can start for real: the script will open the first selected image in each folder and use the clone stamp to line up the decensored gallery with the censored one. (don't move the mouse while this is going on, or the stamp might end up out of alignment) Finish copying the decensor and press
capslock twice to open the Save For Web dialog (you have to press Save manually the first time; make sure the directory and the save format are correct) and go on to the next page.
If you get interrupted, Reload the script, close Photoshop tabs, and you can start again from the currently selected page in the folders.
Once finished, or there's an issue and need to reset, right click the green AHK icon in the system tray and exit or Reload.
If your system is slow, the script's Sleep commands might be too short, and it might try to do too much in too short of a time, and mess up in Photoshop. You can either Reload and try again, or you can try to edit the script code and increase Sleep times, if you can identify where the problem is. (eg "Sleep 300" = script pauses for 0.3 seconds waiting for Photoshop to finish processing)
This script doesn't
only allow for copying decensors quickly; you can do the reverse, for instance, and copy text bubbles from a censored version of a gallery onto a decensored version of a gallery, or from a non-colorized version to a colorized version. You could also use the script for removing scanmarks.
I would be more than happy if even
one person started using this to spread decensored versions around more. Getting it set up and working may be a chore, but it's worth it if you want to upload decensors to help the community - if you have any problems I want to help fix them. Feel free to ask questions or for improvements or examples. (Currently it only supports copying a decensor into one language at a time, but that might change in the future)