Colour Manipulation

Peter Reid preid at reidit.co.uk
Sat Mar 18 14:20:36 EDT 2017


I've got an app that allows the user to display an image using a variable number of colours (2-24 colours).  In addition, the user can specify upper and lower thresholds so that all pixels below a specified value are displayed using a colour such as black and all pixels with values above a specified value are displayed using a colour such as red.  Pixels with values between the thresholds are displayed using the specified colour range of 2-24 colours. The images can consist of up to 8-10 million pixels, they are rectangular and can be in a landscape or portrait orientation.

Whilst I have this working the code that manages the changing of the number and use of colours in an image is rather slow.  This is despite me using the "repeat for each" loop structure and lock the screen wherever possible to get the maximum speed!

Does anyone have any clever algorithms, code, add-ons, etc. that can do this kind of thing in a flash?!

Thanks

Peter
--
Peter Reid
Loughborough, UK





More information about the use-livecode mailing list