Twitter Flickr E-mail
Black Silk - Innovative BW Imaging

Black Silk is a professional black and white toolkit, which provides fast filters and image enhancement algorithms for optimal results. Black Silk is currently in a very early development stage and is free until the final version releases.



Download Now!
formats

Black Silk 0.3.1 Release

Published on April 20, 2013 in Black Silk

Black Silk Logo
Today we publish a small in-between update for Black Silk.
The latest version received the following improvements:
* you can open images with drag and drop
* new installer for the PS plugins for Mac and Win
* internal: all versions are now built equally with Qt 4.8.4
* internal: converted the Visual Studio project file to qmake and merged them with the Linux and Mac qmake files

You can download the latest version here.

There are still some issues though. The current renderer is not very stable and we work hard to replace it with a more stable and versatile rendering engine.

If you enjoy Black Silk, we’d be happy to hear some feedback!

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Bash logger with file line macro

Published on March 24, 2013 in Tech

Today I built the installer for the BlackSilk Photoshop plugin for OSX. Since the content can be installed only to one destination, I included a post-install script, which searches for all installed Photoshop versions and copies the plugin from /tmp/ to the plugin folder(s).

When I finished the post-install script, the installer still failed and to find out why, I needed a log. So I wrote a simple logger for bash, which can be placed before the real script begins:

For advanced usage, means if you want to include line numbers, you need to apply some bash recursion. Since bash doesn’t know a preprocessor, you have to use cpp (1) or sed. I used sed, since I need to replace only the line number:

This script executes only the line with the sed command, which reads the bash script itself, replaces all LOG statements with log $LINENO, sets the filename, outcomments itself and pipes the modified self again to bash. The disadvantage is, that arguments are not passed to the redirection.

Links:
1) HOWTO: Use the C Preprocessor in a bash script.
2) http://tldp.org/LDP/abs/html/internalvariables.html

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Self-extracting lzma-compressed binary with NSIS

Published on March 17, 2013 in Tech, Utilities

Yesterday I wrote the new installer for the Black Silk Photoshop Plugin. The new one automatically searches the Windows registry for the Photoshop plugin paths, so the user doesn’t have to select an installation path.

After that I did some experimenting with NSIS and asked myself, if it was possible to write a self-extracting binary with it. This is, what I got after some coding, I hope it’s useful for someone:

This installer copies itself to %temp% and writes its origin path to the Windows registry. Then it starts the copy. The copy reads the origin path from the registry, copies the payload to the origin path and starts it.
If you want to beautify the installer, you may add a custom icon to the installer options.

For the sake of completeness, my sample payload:

Links:
http://nsis.sourceforge.net/Main_Page

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Case insensitive string search with the STL

Published on March 11, 2013 in Tech

Boost is a full blown C++ template framework with many different modules and ten thousands of code lines. It contains many useful template utilities and should be a major reference for ambitious C++ programmers, who are interested in template programming. Boost contains some good portions of C++ template magic such as the hilarious meta programming and functional programming modules. But this complex network of modules, classes and functions is also a big overhead, if you only want to use some of the helper utilities. One of these helper utilities is boost::iequals. boost::iequals offers a simple interface for case insensitive string comparison.

The following code searches for the literal ‘world’ in a simple utf8/ascii std::string object:

It’s also possible to search in a wide string without any usage of boost and only a few lines of code:

 

In most of the cases, this is the ugliest and slowest solution.  This is a general rule of thumb:

  • If the data you are working on, is not in a suitable format and you access the data more than a few times, convert the data to a suitable format.

In other words:

  • If you search many times for case insensitive substrings, convert all strings you work on, to lower or upper case, so you don’t have to convert two strings every time you search for a specific substring.

The advantages of this rule is obvious:

  • More performance( N function calls less( N >= 0, N <= src.size() ) )
  • Less error-prone
  • Clean code

Lower/Uppercase string conversion can be very easily achieved with std::transform:

 

 

All code samples are fully compatible with Visual Studio 2010, GCC 4.5 and Clang 2.9.

 

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Case insensitive string search and comparison with Boost

Published on March 11, 2013 in Tech

Today I had the problem, that I wanted to find a std::string in another, but without case sensitivity.
The std::string class offers only find(), so the usual method is to transform both strings to lowercase and search then. But there has to be a more elegant solution, and there is, Boost offers an i-Version, means a case insensitive variant of find() and equals().
Here is a sample how to use these two methods:

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Compiling with MSVC, Cygwin and qmake

Published on March 3, 2013 in Tech

Today I had some trouble compiling my unit tests under Windows from the Cygwin terminal.
I have five unit tests, which are each independend qmake projects based on QtTest. Also I have a bash script which enters each test, cleans up, runs qmake, make and the test itself. This bash script runs fine under OSX and Linux, so I wanted to run it under Cygwin, too.
To set the visual studio environment for Cygwin, you have to add “vcvarsall.bat amd64″ to the batch script, which starts Cygwin. You cannot call vcvarsall.bat from within Cygwin (1), cl.exe with still miss some dlls then.

The second thing, you need to pay attention is, that you have now two link.exe binaries in your PATH and the Cygwin one is first (2). To change that you have to reverse the PATH order in /etc/profile:

Now you have a working vs build environment from within Cygwin. And my bash script runs the unit tests equally on all OS.

Sources:
(1) stackoverflow: Invoking cl.exe (MSVC compiler) in Cygwin shell
(2) stackoverflow: /usr/local/bin:/usr/bin: to the end of $PATH instead of at the top

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Black Silk 0.3.0 for Ubuntu 12.10 and 12.04

Published on December 2, 2012 in Black Silk

Black Silk 0.3.0 will be available for Ubuntu 12.10 and 12.04 in a few weeks. We’re currently waiting for response from the Ubuntu Software Center review team. If you don’t want to wait until the Ubuntu Software Center version releases, you can download and try out the native linux version. Unfortunately you have to wait until the software center team approves Black Silk 0.3.0, if you encounter problems running the native linux version.

 

Any questions? Email me or post your question in the comment box below.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

pathpath – easy editing of the %PATH% environment variable

Published on December 1, 2012 in Tech, Utilities

Everyone who has to use the commandline under Windows, knows, how painful the editing of the %PATH% environment variable (path) can be. This helper application eases the editing while writing the path as newline separated list into a normal textfile.

There you can easily edit the path and read it back with pathpath. For more information and usage instructions, read the README.txt included in the zip package.

Since setting the path is a system wide registry access, pathpath needs admin rights to write the path back to the registry. If you want to know, what pathpath exactly does, you can have a look at the sourcecode and build your own version:
https://github.com/elsamuko/pathpath

 

Download

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Black Silk 0.3.0 Release

Published on November 24, 2012 in Black Silk

After a longer development cycle we are happy to announce the latest version of Black Silk.

Sharpen
The biggest novelty in this release is the new sharpen filter.

The sharpen filter is a stacked unsharp mask (USM), which combines four sharpen filters with the sharpen radii from 0.7 to 5.6 pixels. It offers the possibility to adjust the fine details and the more coarse elements within the same filters.
The stepwidth is logarithmic to offer maximum control over the full range.

Grain
The grain filter was completely reworked, which is now smoother and easier to control. You can finetune the strength and the coarseness of the grain filter in small steps.

Curves
We replaced the interpolation algorithm of the curve tool from BSpline to Bezier. The Bezier is much easier to control and gives a more pleasant result, even with extreme settings.

Presets
The latest BlackSilk also introduces a new preset system. You can save and load your current state to a preset. This allows to switch easily between different looks and to share settings on different instances of Black Silk.

Download
Black Silk 0.3.0 can be downloaded from our Downloads page:
http://fd-imaging.com/apps-2/blacksilk-bw-toolkit/download/

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

NewFinder App for OSX

Published on October 6, 2012 in Apple

This little aNewFinder Iconpp is a replacement for the Finder icon in the OSX dock.
Instead of showing the current instance of Finder, it always opens a new instance of Finder with the home folder, thus preventing spaces jumping and unwanted window switching.

Just download the attachment, unzip it and put it in the dock.

This app is an AppleScript with custom icon based on this description from Stackexchange.

Download

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments