From e79f5518dd052cb00999e5d7eddbe05581cebb80 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 22 Apr 2016 08:54:30 -0600 Subject: [PATCH] apps/examples/nximage: Add configuration option to select greyscale image --- ChangeLog.txt | 2 + NxWidgets/Kconfig | 8 ++++ examples/nximage/Kconfig | 101 +++++++++++++++++++++------------------ 3 files changed, 64 insertions(+), 47 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 8b6f60059..b17e2577b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1581,4 +1581,6 @@ moved to Obsoleted/apps/system/sdcard (2016-03-29). * apps/examples/alarm: Add a simple test of the ALARM iotcl calls of the RTC driver (2016-04-03). + * apps/examples/nximage: No configuration option to select + greyscale. diff --git a/NxWidgets/Kconfig b/NxWidgets/Kconfig index d0026e492..9474cacc9 100644 --- a/NxWidgets/Kconfig +++ b/NxWidgets/Kconfig @@ -129,6 +129,13 @@ config NXWIDGETS_BPP Supported bits-per-pixel {8, 16, 24, 32}. Default: The smallest BPP configuration supported by NX. +config NXWIDGETS_GREYSCALE + bool "Greyscale (vs RGB)" + default n + ---help--- + Select to use a greyscale vs RGB color image. This option is ignored if + CONFIG_NXWIDGETS_BPP > 8 + config NXWIDGETS_SIZEOFCHAR int "Size of a character (1 or 2 bytes)" range 1 2 @@ -1284,3 +1291,4 @@ endmenu # NxWM Media Player Display Settings endif # NXWM endmenu # NxWidgets/NxWM + diff --git a/examples/nximage/Kconfig b/examples/nximage/Kconfig index 71aaa49e2..70dca248f 100644 --- a/examples/nximage/Kconfig +++ b/examples/nximage/Kconfig @@ -12,72 +12,79 @@ config EXAMPLES_NXIMAGE if EXAMPLES_NXIMAGE config EXAMPLES_NXIMAGE_VPLANE - int "Video Plane" - default 0 - ---help--- - The plane to select from the framebuffer driver for use in the test. - Default: 0 + int "Video Plane" + default 0 + ---help--- + The plane to select from the framebuffer driver for use in the test. + Default: 0 config EXAMPLES_NXIMAGE_DEVNO - int "Video Device Number" - default 0 - ---help--- - The LCD device to select from the LCD driver for use in the test: - Default: 0 + int "Video Device Number" + default 0 + ---help--- + The LCD device to select from the LCD driver for use in the test: + Default: 0 config EXAMPLES_NXIMAGE_BPP - int "Bits-Per-Pixel" - default 32 - ---help--- - Pixels per pixel to use. Valid options include 1, 2, 4, 8, 16, 24, - and 32. Default is 32. + int "Bits-Per-Pixel" + default 32 + ---help--- + Pixels per pixel to use. Valid options include 1, 2, 4, 8, 16, 24, + and 32. Default is 32. + +config EXAMPLES_NXIMAGE_GREYSCALE + bool "Greyscale (vs RGB)" + default n + ---help--- + Select to use a greyscale vs RGB color image. This option is ignored if + CONFIG_EXAMPLES_NXIMAGE_BPP > 8 config EXAMPLES_NXIMAGE_XSCALEp5 - bool "Scale X by 50%" - default n - ---help--- - Reduce image scale by 50% of its original size. + bool "Scale X by 50%" + default n + ---help--- + Reduce image scale by 50% of its original size. config EXAMPLES_NXIMAGE_XSCALE1p0 - bool "Don't scale image." - default y - ---help--- - Keep original image size. + bool "Don't scale image." + default y + ---help--- + Keep original image size. config EXAMPLES_NXIMAGE_XSCALE1p5 - bool "Scale X by 150%" - default n - ---help--- - Increase image scale by 50% of its original size. + bool "Scale X by 150%" + default n + ---help--- + Increase image scale by 50% of its original size. config EXAMPLES_NXIMAGE_XSCALE2p0 - bool "Scale X by 200%" - default n - ---help--- - Increase image scale by 200% of its original size. + bool "Scale X by 200%" + default n + ---help--- + Increase image scale by 200% of its original size. config EXAMPLES_NXIMAGE_YSCALEp5 - bool "Scale Y by 50%" - default n - ---help--- - Reduce image scale by 50% of its original size. + bool "Scale Y by 50%" + default n + ---help--- + Reduce image scale by 50% of its original size. config EXAMPLES_NXIMAGE_YSCALE1p0 - bool "Don't scale image." - default y - ---help--- - Keep original image size. + bool "Don't scale image." + default y + ---help--- + Keep original image size. config EXAMPLES_NXIMAGE_YSCALE1p5 - bool "Scale Y by 150%" - default n - ---help--- - Increase image scale by 50% of its original size. + bool "Scale Y by 150%" + default n + ---help--- + Increase image scale by 50% of its original size. config EXAMPLES_NXIMAGE_YSCALE2p0 - bool "Scale Y by 200%" - default n - ---help--- - Increase image scale by 200% of its original size. + bool "Scale Y by 200%" + default n + ---help--- + Increase image scale by 200% of its original size. endif