© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
T. LaversLearn to Program with Kotlinhttps://doi.org/10.1007/978-1-4842-6815-5_14

14. Color Pictures

Tim Lavers1  
(1)
Woonona, NSW, Australia
 

In this chapter, we will return to programs that display images. We will begin by showing simple color patterns such as national flags. Then we will see how to load image files such as photographs. Finally, we will write code that does simple image manipulations, such as flipping them in the vertical axis.

14.1 Modeling Color

Computer screens display images by producing huge numbers of tiny colored dots called pixels. (The word “pixels” is short for “picture cells.”) On many modern screens, these dots are too small to ...

Get Learn to Program with Kotlin: From the Basics to Projects with Text and Image Processing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.