apps/examples/nximage: Add configuration option to select greyscale image

This commit is contained in:
Gregory Nutt 2016-04-22 08:54:30 -06:00
parent eedac48c7b
commit e79f5518dd
3 changed files with 64 additions and 47 deletions

View File

@ -1581,4 +1581,6 @@
moved to Obsoleted/apps/system/sdcard (2016-03-29). moved to Obsoleted/apps/system/sdcard (2016-03-29).
* apps/examples/alarm: Add a simple test of the ALARM iotcl calls * apps/examples/alarm: Add a simple test of the ALARM iotcl calls
of the RTC driver (2016-04-03). of the RTC driver (2016-04-03).
* apps/examples/nximage: No configuration option to select
greyscale.

View File

@ -129,6 +129,13 @@ config NXWIDGETS_BPP
Supported bits-per-pixel {8, 16, 24, 32}. Default: The smallest Supported bits-per-pixel {8, 16, 24, 32}. Default: The smallest
BPP configuration supported by NX. 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 config NXWIDGETS_SIZEOFCHAR
int "Size of a character (1 or 2 bytes)" int "Size of a character (1 or 2 bytes)"
range 1 2 range 1 2
@ -1284,3 +1291,4 @@ endmenu # NxWM Media Player Display Settings
endif # NXWM endif # NXWM
endmenu # NxWidgets/NxWM endmenu # NxWidgets/NxWM

View File

@ -12,72 +12,79 @@ config EXAMPLES_NXIMAGE
if EXAMPLES_NXIMAGE if EXAMPLES_NXIMAGE
config EXAMPLES_NXIMAGE_VPLANE config EXAMPLES_NXIMAGE_VPLANE
int "Video Plane" int "Video Plane"
default 0 default 0
---help--- ---help---
The plane to select from the framebuffer driver for use in the test. The plane to select from the framebuffer driver for use in the test.
Default: 0 Default: 0
config EXAMPLES_NXIMAGE_DEVNO config EXAMPLES_NXIMAGE_DEVNO
int "Video Device Number" int "Video Device Number"
default 0 default 0
---help--- ---help---
The LCD device to select from the LCD driver for use in the test: The LCD device to select from the LCD driver for use in the test:
Default: 0 Default: 0
config EXAMPLES_NXIMAGE_BPP config EXAMPLES_NXIMAGE_BPP
int "Bits-Per-Pixel" int "Bits-Per-Pixel"
default 32 default 32
---help--- ---help---
Pixels per pixel to use. Valid options include 1, 2, 4, 8, 16, 24, Pixels per pixel to use. Valid options include 1, 2, 4, 8, 16, 24,
and 32. Default is 32. 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 config EXAMPLES_NXIMAGE_XSCALEp5
bool "Scale X by 50%" bool "Scale X by 50%"
default n default n
---help--- ---help---
Reduce image scale by 50% of its original size. Reduce image scale by 50% of its original size.
config EXAMPLES_NXIMAGE_XSCALE1p0 config EXAMPLES_NXIMAGE_XSCALE1p0
bool "Don't scale image." bool "Don't scale image."
default y default y
---help--- ---help---
Keep original image size. Keep original image size.
config EXAMPLES_NXIMAGE_XSCALE1p5 config EXAMPLES_NXIMAGE_XSCALE1p5
bool "Scale X by 150%" bool "Scale X by 150%"
default n default n
---help--- ---help---
Increase image scale by 50% of its original size. Increase image scale by 50% of its original size.
config EXAMPLES_NXIMAGE_XSCALE2p0 config EXAMPLES_NXIMAGE_XSCALE2p0
bool "Scale X by 200%" bool "Scale X by 200%"
default n default n
---help--- ---help---
Increase image scale by 200% of its original size. Increase image scale by 200% of its original size.
config EXAMPLES_NXIMAGE_YSCALEp5 config EXAMPLES_NXIMAGE_YSCALEp5
bool "Scale Y by 50%" bool "Scale Y by 50%"
default n default n
---help--- ---help---
Reduce image scale by 50% of its original size. Reduce image scale by 50% of its original size.
config EXAMPLES_NXIMAGE_YSCALE1p0 config EXAMPLES_NXIMAGE_YSCALE1p0
bool "Don't scale image." bool "Don't scale image."
default y default y
---help--- ---help---
Keep original image size. Keep original image size.
config EXAMPLES_NXIMAGE_YSCALE1p5 config EXAMPLES_NXIMAGE_YSCALE1p5
bool "Scale Y by 150%" bool "Scale Y by 150%"
default n default n
---help--- ---help---
Increase image scale by 50% of its original size. Increase image scale by 50% of its original size.
config EXAMPLES_NXIMAGE_YSCALE2p0 config EXAMPLES_NXIMAGE_YSCALE2p0
bool "Scale Y by 200%" bool "Scale Y by 200%"
default n default n
---help--- ---help---
Increase image scale by 200% of its original size. Increase image scale by 200% of its original size.
endif endif