LumaTone 1.1.1 (Create duotone, tritone, sepia like images)

Developed or developing a new product in PureBasic? Tell the world about it.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

LumaTone 1.1.1 (Create duotone, tritone, sepia like images)

Post by wilbert »

LumaTone 1.1.1 (OSX / Windows / Linux)

LumaTone is a small (batch) utility I created with PureBasic to apply a color scheme to images based on the luma value of each pixel.
Things you can do with it are for example to create a duotone or sepia effect.
It's mainly targeted at working with jpeg photos but you can use for example png as well.
Be ware though that png encoding can be very slow for large images.

The utility is cross platform and portable meaning that user presets are stored in a small .dat file in the same folder as the app itself and nothing is installed on the computer.
In fact, if you place multiple OS versions in the same folder on a usb stick, you should be able to use it where you go.
The OSX version is not signed so you have to right-click the file the first time to give permission to open it.
I'm not very familiar with Linux so I can only hope it works on distributions other than the one I used to create it.

A thank you to J. Baker for creating the app icon and to Keya for solving the problems with libjpeg-turbo on Windows.

Hope you enjoy it :)

Examples
Input
Image
Output
Image

Image

Image

Input
Image
Output
Image

Image

Image


Screenshot (Windows 10)
Image


Current build :
LumaTone_1_1_1_OSX_x64.zip
LumaTone_1_1_1_Windows_x86.zip
LumaTone_1_1_1_Linux_x64.zip

Previous build :
LumaTone_1_1_0_OSX_x64.zip
LumaTone_1_1_0_Windows_x86.zip
LumaTone_1_1_0_Linux_x64.zip


Changelog :
v1.1.1 Added a slider to control the brightness of source images and added a click to refresh for the large preview window.
v1.1.0 Added grabbing screen colors ( [ctrl] + [G] ) and changed png encoder
v1.0.5 Added full size preview window ( open with [ctrl] + [P] )
v1.0.0 Initial release
Last edited by wilbert on Wed May 31, 2017 3:04 pm, edited 18 times in total.
Windows (x64)
Raspberry Pi OS (Arm64)
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: GrayTone 1.0.0

Post by davido »

@wilbert,
Very nice, thank you. :D
I appreciate the time you have spent in getting this 'just right'.
DE AA EB
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: GrayTone 1.0.0

Post by wilbert »

davido wrote:I appreciate the time you have spent in getting this 'just right'.
Thanks :)
I tried to get it right of course so it's nice to hear this comment.
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
BasicallyPure
Enthusiast
Enthusiast
Posts: 536
Joined: Thu Mar 24, 2011 12:40 am
Location: Iowa, USA

Re: GrayTone 1.0.0

Post by BasicallyPure »

Wilbert,
It's working fine with Linux Mint 17.1

I see you have solved the problem of setting the transition points when blending between different colours.
As you know I was only able to make it work with transitions at 50%, 25%, and 12.5%.

If you don't mind me asking is the fact that you provide the choice of up to nine colours an arbitrary one or
is that a requirement for your algorithm?
BasicallyPure
Until you know everything you know nothing, all you have is what you believe.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: GrayTone 1.0.0

Post by wilbert »

BasicallyPure wrote:It's working fine with Linux Mint 17.1
Glad to hear it is working on another computer as well when it comes to Linux.
BasicallyPure wrote:I see you have solved the problem of setting the transition points when blending between different colours.
As you know I was only able to make it work with transitions at 50%, 25%, and 12.5%.

If you don't mind me asking is the fact that you provide the choice of up to nine colours an arbitrary one or
is that a requirement for your algorithm?
It's mainly a design choice. To get the processing speed I was aiming for, the only option I could think of was to use a lookup table. So for that part there is no special algorithm.
The procedure that precomputes the lookup table now expects this kind of input (maximum 9 colors at fixed intervals of 12.5%) but I could also have created it differently.
It's just that these values felt right to me as they give enough flexibility and ease of use at the same time.
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
Keya
Addict
Addict
Posts: 1891
Joined: Thu Jun 04, 2015 7:10 am

Re: GrayTone 1.0.0

Post by Keya »

very nice! I find the app title confusing though because I thought it was for grayscale conversions only, but i see it's actually for any duotone (i think thats correct term?) ? :)
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: GrayTone 1.0.0

Post by wilbert »

Keya wrote:very nice!
Thanks :)
Keya wrote:I find the app title confusing though because I thought it was for grayscale conversions only, but i see it's actually for any duotone (i think thats correct term?) ? :)
It can be used for duotone (it is the correct term) but also to give you an effect like tritone or sepia coloring.
For me the title was logical. Because it's a two step process (color -> gray > toning) and can do more than only a duotone effect I thought to combine the words Grayscale and Duotone / Tritone / Quadtone into GrayTone. I can see now the title can be confusing. Don't know if it would be wise to rename it (and if so how to name it) or just state clearer what it can do (maybe with some more screenshots). I modified the topic title to make it at least a bit clearer.
Windows (x64)
Raspberry Pi OS (Arm64)
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: GrayTone 1.0.0

Post by Dude »

wilbert wrote:Don't know if it would be wise to rename it
It's only new, so definitely rename it. I too thought it was just another app for grayscaling images, and almost didn't read this thread because of it. Rename it to something like "ImageTone" or "ToneChange" or such.
User avatar
Keya
Addict
Addict
Posts: 1891
Joined: Thu Jun 04, 2015 7:10 am

Re: GrayTone 1.0.0 (Create duotone, tritone, sepia like ima

Post by Keya »

Dude wrote:Rename it to something like "ImageTone" or "ToneChange" or such.
or EasyTone? AnyTone? ToneItDownToots? WtfIsTone? :D
wilbert wrote:For me the title was logical. Because it's a two step process (color -> gray > toning)
For the user though isn't it essentially just color -> toning? - the internal gray middle stage is transparent to them? :)
just playing devils advocate though! and my suggestions are usually wrong lol
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: GrayTone 1.0.0 (Create duotone, tritone, sepia like ima

Post by Dude »

Keya wrote:EasyTone? AnyTone? ToneItDownToots? WtfIsTone?
DTMF_Tone? ;)
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: LumaTone 1.0.0 (Create duotone, tritone, sepia like ima

Post by wilbert »

@Dude, @Keya,
Okay, name has been changed from GrayTone to LumaTone :wink:
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: LumaTone 1.0.0 (Create duotone, tritone, sepia like ima

Post by Lunasole »

I tried using your app to colorize grayscale images and generally it is very interesting ^^
I like the idea of selecting some palette of colors and then applying each of them to some range of gray.
But it surely lacks of real-time preview for such thing, would be better something like having list of input files and selected list element becomes preview, instead of that apple.

Also I like the way you making GUI, drag&drop is definitely better than annoying standart files dialogs requesting too much actions, in my utils I often did such way too (however, in PB adding drag&drop is not so easy as it was in VB6).
wilbert wrote:@Dude, @Keya,
Okay, name has been changed from GrayTone to LumaTone :wink:
"50 lumatones of grey" :3
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: LumaTone 1.0.0 (Create duotone, tritone, sepia like ima

Post by wilbert »

Lunasole wrote:But it surely lacks of real-time preview for such thing, would be better something like having list of input files and selected list element becomes preview, instead of that apple.
The whole idea of that relatively small preview was to have everything respond in real-time to any color change you make. Updating a full 12 or 20 megapixel image every time wouldn't be fast enough.
You can however drop an image file on the preview area (is also mentioned in the help). It will be scaled down and replace the apple so you can use your own preview image. I chose the apple as a standard image because it covers a large range of tones.
I prefer not to work with a list of images for the preview. What I maybe could do is make the preview tabbed to easily switch between a few preview images if one preview is not enough.
Windows (x64)
Raspberry Pi OS (Arm64)
Fred
Administrator
Administrator
Posts: 16680
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: LumaTone 1.0.0 (Create duotone, tritone, sepia like ima

Post by Fred »

Works fine here as well, nice software !
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: LumaTone 1.0.0 (Create duotone, tritone, sepia like ima

Post by wilbert »

Fred wrote:Works fine here as well, nice software !
Thanks :)
CanvasGadget was very helpful when creating it.
Windows (x64)
Raspberry Pi OS (Arm64)
Post Reply