[orx-color] Fix misplaced demo comments
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
package histogram// Show color histogram of an image
|
||||
package histogram
|
||||
|
||||
import org.openrndr.application
|
||||
import org.openrndr.draw.loadImage
|
||||
import org.openrndr.extra.color.statistics.calculateHistogramRGB
|
||||
|
||||
/*
|
||||
* Demonstrates how to generate a palette with the top 32 colors
|
||||
* of a loaded image, sorted by luminosity. The colors are displayed
|
||||
* as rectangles overlayed on top of the image.
|
||||
*/
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 720
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package histogram// Show color histogram using non-uniform weighting
|
||||
package histogram
|
||||
|
||||
import org.openrndr.application
|
||||
import org.openrndr.draw.loadImage
|
||||
import org.openrndr.extra.color.statistics.calculateHistogramRGB
|
||||
import kotlin.math.pow
|
||||
|
||||
/*
|
||||
* Show the color histogram of an image using non-uniform weighting,
|
||||
* prioritizing bright colors.
|
||||
*/
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 720
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
package histogram// Create a simple rectangle composition based on colors sampled from image
|
||||
package histogram
|
||||
|
||||
import org.openrndr.application
|
||||
import org.openrndr.draw.loadImage
|
||||
import org.openrndr.extra.color.statistics.calculateHistogramRGB
|
||||
|
||||
/*
|
||||
* Create a simple grid-like composition based on colors sampled from image.
|
||||
* The cells are 32 by 32 pixels in size and are filled with a random sample
|
||||
* taken from the color histogram of the image.
|
||||
*
|
||||
* Note: due to its random nature the resulting animation contains flickering colors.
|
||||
*/
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 720
|
||||
|
||||
Reference in New Issue
Block a user