Prizm 1.0 now available!

Prizm is a fully functional .NET library for working with color spaces with numerous features.

This is the first update I’ve posted in quite some time. There are several new articles I have had scheduled but due to their time-consuming nature they were put on the back burner so I could focus on my open source efforts. If you have not visited my Github profile, that is where I tend to focus most of my attention these days. I do however plan to update this site more in the next couple months including a new logo I’ve designed as well as the afforementioned new articles.

Secure Synchronization using SSH

Allows you to synchronize a directory over a secure shell connection. It also has functionality to allow you to run commands remotely, all without leaving the comfort of your local machine.

Installation

    1. Ensure Python 3 and pip are installed.
    2. Install with the following command
    pip install -r requirements.txt
    3. Run with python secure-sync.py

Usage

See secure-sync.py --help for help with parameters.

Running Commands Remotely

You can run arbitrary commands on the remote machine by populating your local directory (created by secure-sync) with a .command file. secure-sync will recognize this file and will cd to the equivalent directory on the remote machine and execute the commands in this file line by line, piping their output to your local machine.

Download

secure-sync.zip 11/04/2017 7 Kb

Website Status

Please excuse me if you are finding some links on the site broken. I just finished migrating to a new server and in the process of updating everything. Also expect many updates to come this Summer. I apologize for the lack of content but I’ve been working heavily on the new version 3.0 of RasterWave.

Recursive Folder Synchronization using VBScript

This is a script written years ago that I still find useful; I had a need to apply updates to many local machines that had no network access from an external hard drive. It synchronizes the contents (files and subfolders) of two folders. Each folder is traversed recursively and any missing subfolders and files are copied both ways. If corresponding folders contain files with matching file names but with different timestamps, the file with the oldest timestamp will be overwritten.

Option Explicit

ForceScriptEngine("cscript")

Dim wshArgs
Set wshArgs = Wscript.Arguments
If WshArgs.Count = 2 Then
  Call SyncFolders(WshArgs.Item(0), WshArgs.Item(1))
  ' Also run once in reverse to catch mismatching subfolder count:
  Call SyncFolders(WshArgs.Item(1), WshArgs.Item(0))
Else
  Wscript.Echo("Wrong number of arguments. Syntax: SyncFolders Folder1 Folder2")
  Wscript.Sleep(3000) ' To allow Function syntax popup message to be seen.
End If

Sub SyncFolders(strFolder1, strFolder2)
  Dim objFileSys
  Dim objFolder1
  Dim objFolder2
  Dim objFile1
  Dim objFile2
  Dim objSubFolder
  Dim arrFolders
  Dim i
  Set objFileSys = CreateObject("Scripting.FileSystemObject")
  arrFolders = Array(strFolder1, strFolder2)
  For i = 0 To 1 ' Make sure that missing folders are created first:
    If objFileSys.FolderExists(arrFolders(i)) = False Then
      wscript.echo("Creating folder " & arrFolders(i))
      objFileSys.CreateFolder(arrFolders(i))
    End If
  Next
  Set objFolder1 = objFileSys.GetFolder(strFolder1)
  Set objFolder2 = objFileSys.GetFolder(strFolder2)
  For i = 0 To 1
    If i = 1 Then ' Reverse direction of file compare in second run
      Set objFolder1 = objFileSys.GetFolder(strFolder2)
      Set objFolder2 = objFileSys.GetFolder(strFolder1)
    End If
    For Each objFile1 in objFolder1.files
      If Not objFileSys.FileExists(objFolder2 & "\" & objFile1.name) Then
        Wscript.Echo("Copying " & objFolder1 & "\" & objFile1.name & _
          " to " & objFolder2 & "\" & objFile1.name)
        objFileSys.CopyFile objFolder1 & "\" & objFile1.name, _
          objFolder2 & "\" & objFile1.name
      Else
        Set objFile2 = objFileSys.GetFile(objFolder2 & "\" & objFile1.name)
        If objFile1.DateLastModified > objFile2.DateLastModified Then
          Wscript.Echo("Overwriting " & objFolder2 & "\" & objFile1.name & _
            " with " & objFolder1 & "\" & objFile1.name)
          objFileSys.CopyFile objFolder1 & "\" & objFile1.name, _
            objFolder2 & "\" & objFile1.name    
        End If
      End If
    Next
  Next
  For Each objSubFolder in objFolder1.subFolders
    Call SyncFolders(strFolder1 & "\" & objSubFolder.name, strFolder2 & _
      "\" & objSubFolder.name)
  Next
  Set objFileSys = Nothing
End Sub

Sub ForceScriptEngine(strScriptEng)
  ' Forces this script to be run under the desired scripting host.
  ' Valid arguments are "wscript" or "cscript".
  ' The command line arguments are passed on to the new call.
  Dim arrArgs
  Dim strArgs
  For Each arrArgs In WScript.Arguments
    strArgs = strArgs & " " & Chr(34) & arrArgs & Chr(34)
  Next
  If Lcase(Right(Wscript.FullName, 12)) = "\wscript.exe" Then
    If Instr(1, Wscript.FullName, strScriptEng, 1) = 0 Then
      CreateObject("Wscript.Shell").Run "cscript.exe //Nologo " & _
        Chr(34) & Wscript.ScriptFullName & Chr(34) & strArgs
      Wscript.Quit
    End If
  Else
    If Instr(1, Wscript.FullName, strScriptEng, 1) = 0 Then
      CreateObject("Wscript.Shell").Run "wscript.exe " & Chr(34) & _
        Wscript.ScriptFullName & Chr(34) & strArgs
      Wscript.Quit
    End If
  End If
End Sub

When only one-way sync is needed (only folder 2 is modified), use this version:

Option Explicit

ForceScriptEngine("cscript")

Dim wshArgs
Set wshArgs = Wscript.Arguments
If WshArgs.Count = 2 Then
  Call SyncFolders(WshArgs.Item(0), WshArgs.Item(1))
Else
  Wscript.Echo("Wrong number of arguments. Syntax: SyncFolders Folder1 Folder2")
  Wscript.Sleep(3000) ' To allow Function syntax popup message to be seen.
End If

Sub SyncFolders(strFolder1, strFolder2)
  ' Note: This version only copies from folder1 to folder2
  Dim objFileSys
  Dim objFolder1
  Dim objFolder2
  Dim objFile1
  Dim objFile2
  Dim objSubFolder
  Dim arrFolders
  Dim i
  arrFolders = Array(strFolder1, strFolder2)
  Set objFileSys = CreateObject("Scripting.FileSystemObject")
  For i = 0 To 1 ' Make sure that missing folders are created first:
    If objFileSys.FolderExists(arrFolders(i)) = False Then
      wscript.echo("Creating folder " & arrFolders(i))
      objFileSys.CreateFolder(arrFolders(i))
    End If
  Next
  Set objFolder1 = objFileSys.GetFolder(strFolder1)
  Set objFolder2 = objFileSys.GetFolder(strFolder2)
  For Each objFile1 in objFolder1.files
    If Not objFileSys.FileExists(objFolder2 & "\" & objFile1.name) Then
      Wscript.Echo("Copying " & objFolder1 & "\" & objFile1.name & _
        " to " & objFolder2 & "\" & objFile1.name)
      objFileSys.CopyFile objFolder1 & "\" & objFile1.name, _
        objFolder2 & "\" & objFile1.name
    Else
      Set objFile2 = objFileSys.GetFile(objFolder2 & "\" & objFile1.name)
      If objFile1.DateLastModified > objFile2.DateLastModified Then
        Wscript.Echo("Overwriting " & objFolder2 & "\" & objFile1.name & _
          " with " & objFolder1 & "\" & objFile1.name)
        objFileSys.CopyFile objFolder1 & "\" & objFile1.name, _
          objFolder2 & "\" & objFile1.name    
      End If
    End If
  Next
  For Each objSubFolder in objFolder1.subFolders
    Call SyncFolders(strFolder1 & "\" & objSubFolder.name, strFolder2 & _
      "\" & objSubFolder.name)
  Next
  Set objFileSys = Nothing
End Sub

Sub ForceScriptEngine(strScriptEng)
  ' Forces this script to be run under the desired scripting host.
  ' Valid arguments are "wscript" or "cscript".
  ' The command line arguments are passed on to the new call.
  Dim arrArgs
  Dim strArgs
  For Each arrArgs In WScript.Arguments
    strArgs = strArgs & " " & Chr(34) & arrArgs & Chr(34)
  Next
  If Lcase(Right(Wscript.FullName, 12)) = "\wscript.exe" Then
    If Instr(1, Wscript.FullName, strScriptEng, 1) = 0 Then
      CreateObject("Wscript.Shell").Run "cscript.exe //Nologo " & _
        Chr(34) & Wscript.ScriptFullName & Chr(34) & strArgs
      Wscript.Quit
    End If
  Else
    If Instr(1, Wscript.FullName, strScriptEng, 1) = 0 Then
      CreateObject("Wscript.Shell").Run "wscript.exe " & Chr(34) & _
        Wscript.ScriptFullName & Chr(34) & strArgs
      Wscript.Quit
    End If
  End If
End Sub

What’s happening?

I haven’t posted anything new in a while but I’ve been very busy on the next release of RasterWave. Several new features have already been implemented including: lasso, polygon, and magic wand selection tools. Some UI layout improvements have also been made. I’m considering adding the latest development build as an additional download so users can test out new features.

Also, I have been busy working on a new program called “ClockworkPDF” which can split, merge, and rotate PDF files using batch lists with a nice UI. A beta version should be available soon as I finish up some features and debugging.

RasterWave 2.4 Release

After months of hard work, RasterWave 2.4 is officially available for download. You can grab it from the program page or use the update feature within RasterWave.

For those upgrading directly from version 2.2, you’re going to notice a lot of improvements! You can find a full write-up here, but for those in a hurry, here is an abbreviated list of what’s available in version 2.4.

  • LAYERS! RasterWave now provides comprehensive layer support, including variable opacity, custom blendmodes, on-canvas moving and resizing, and editing without flattening.
  • Numerous interface improvements, including new slider, radio button, and check box controls created specifically for RasterWave.
  • Many new tools, including straighten, auto-correction, auto-enhancement, split-toning, HDR, colored pencil, glass tiles, stained glass, fragment, Kuwahara filtering, lens flare, sunshine, noise removal (bilateral smoothing), and more.
  • Many improvements to existing tools, including overhauled Curve and Level dialogs, tonal range support when adjusting color balance, completely rewritten comic book, relief, emboss/engrave, edge enhance, find edges, rainbow, fog, and ignite filters, and many smaller tweaks and improvements.
  • New Undo History browser
  • Improved performance program-wide, including Performance options, and significant performance improvements when language translations are active.
  • Much better support for non-English locales, including many bug-fixes for locales that use “,”, as a decimal separator.
  • Improved drag/drop support, including improved support for dragging images from web browsers.
  • Improved status bar, including clickable “resize image” button and “fit image on-screen” button.
  • New Malay and Swedish language support
  • Improved support for using arrow keys to modify various settings
  • New Asynchronous image metadata processing. Images with extensive metatdata now load and save much faster than before.
  • Reduced program startup time, and greatly reduced shutdown time when many images are loaded
  • Improved mousewheel zoom, with zoom now preserving cursor location.
  • Improvements to Content-Aware resizing, including faster performance, symmetrical seam removal, and ESC-to-cancel functionality.
  • Improved image load time, especially for large images and/or complex image formats.

For a full list of this version’s bug-fixes, improvements, and enhancements, please view the What’s New file included with RasterWave.

NOTE: As you might have noticed, no screenshots are available of the program’s features. Don’t worry, I’m in the process of adding these.

Update Status

I’m attempting to upload the backlog of code I have on my harddrive as quickly as I can. I’m also running into issues moving some web applications over to the new server, which is producing some unexpected errors. Please be patient as it will take a little bit of time.

RasterWave 2.4 Beta

RasterWave 2.4 is nearing release. A few minor items still need addressing, and some language files are incomplete, but the core program is 99% ready.

The biggest change in this version is new support for image layers. As part of implementing layers, many program elements were rewritten from scratch, so this development cycle as been an arduous one. Hopefully the improvements have been worth the wait!

For users upgrading from 2.2, here is are all the new features and improvements you’ll find in version 2.4.

LAYERS

  • Each image now supports an unlimited number of layers
  • Layers can be reordered using drag-drop, or navigation buttons
  • Variable opacity and 24 blend modes are supported
  • Layered images can be resized, rotated, flipped and mirrored without flattening the image.
  • A new Layers menu provides all the same options as the Layers toolbox, plus aditional options like Flatten Image, Merge Visible Layers, adding/removing individual layer transparency, and adjusting layer orientation.
  • Layers can be moved around the canvas in real-time using the new “Move” tool.
  • The new “Move” tool also allows you to non-destructively resize layers.
  • When moving and sizing layers, you can simply click the relevant layers in the canvas without using the Layer toolbox.
  • Layered images can be now be saved in RasterWave’s own native format (.RWD, “RasterWave Document”).
  • New layer options are available in the Edit menu, including Cut and Copy From Layer, and Paste as New Layer.
  • NON-DESTRUCTIVE EDIT OPTIONS

    These live in the new “quick fix” menu on the toolbar (marked by a lightbulb). Non-destructive means that these changes are not permanently applied to the image. If you wish to undo any edit, simply set the slider back to zero, or use the “reset: button on the quick fix panel. This allows you to customize these parameters whenever you like, without harming image quality.

    NUMEROUS INTERFACE IMPROVEMENTS

    New slider, radio button, and check box controls have been created specifically for RasterWave. Besides looking prettier, they are also much more usable. The sliders in particular now provide much more feedback than the terrible old scroll bars they replaced.

    NEW TOOLS GALORE

  • New Fade tool. After applying an action to an image or layer, you can use Edit > Fade to fade the effect after the fact. Blend mode can also be adjusted.
  • New Straighen tool, for more nuanced control than Arbitrary Rotate.
  • New auto correct options for one-click color, contrast, and lighting fixes.
  • New auto-enhance options for color, contrast, and lighting. These provide an easy way to make a photo more dramatic or colorful, without fiddling with a dialog.
  • Split-toning
  • HDR adjustment
  • Colored pencil artistic effect, with four pencil modes.
  • Glass Tiles
  • Stained Glass
  • Fragment
  • Kuwahara filtering
  • Lens Flare
  • Sunshine
  • Bilateral Smoothing (noise removal)
  • IMPROVEMENTS TO EXISTING TOOLS

    Many of RasterWave’s existing tools have received performance, quality, and other improvements. Some of the notable updates include:

  • Improved Curves dialog, with new per-channel support and an improved interface (including live display of parameters).
  • Overhauled Levels dialog, including per-channel support, click-to-set color options, and a new best-in-class Auto Levels option.
  • Color Balance now allows you to limit color adjustments by tonal range.
  • Overhauled comic book filter, with new options for ink density and color smoothing.
  • Overhauled Relief filter, with new options for angle, thickness, and relief depth.
  • Overhauled Emboss/Engrave filter, with new options for angle, thickness, and depth.
  • Overhauled Edge Enhance filter, with new options for edge detection mode, direction, and strength.
  • Overhauled Find Edges dialog, with new edge operators and directionality support.
  • Overhauled Rainbow filter, with new options for offset, angle, strength, and saturation boosting.
  • Overhauled Fog filter, with new options for scale, contrast, density, and render quality.
  • Overhauled Ignite filter (formerly Burn), with new options for intensity, flame height, and strength.
  • UNDO HISTORY BROWSER

    The new Edit > Undo History browser allows you to jump to any point in an image’s past (or future, if you’ve already undone some changes).

    NEW PERFORMANCE OPTIONS

    A new Performance Options category allows you to customize how RasterWave handles certain trade-offs — for example, if you’re low on disk space, you might prefer to heavily compress Undo/Redo data, which saves space at a slight performance trade-off. Similiary, if you have an underpowered processor, you may wish to reduce the amount of on-screen effects (drop shadows, etc) in order to improve render performance.

    MINOR IMPROVEMENTS WORTH NOTING

  • Much better drag/drop support, including improved support for dragging images from web browsers.
  • Improved status bar, including a clickable “resize image” button and “fit image on-screen” button.
  • Improved support for using arrow keys to modify various settings.
  • New asynchronous image metadata processing. Images with extensive metadata now load and save much faster than before.
  • Reduced program startup time, and greatly reduced shutdown time if many images were loaded.
  • Improved mousewheel zoom, with zoom now preserving cursor location.
  • New Select > Erase selected area option.
  • Many improvements to Content-Aware resizing, including faster performance, symmetrical seam removal, and ESC-to-cancel functionality.
  • Improved image load time, especially for large images and/or complex formats.
  • OFFICIAL RELEASE TIMELINE

    Barring any major bugs, the official 2.4 release should happen within the next week or so. Automatic update notifications for existing installs will go live at that point.