Image Manipulation
To display an image within a cell, you could just resize the large image of the possession from the image store. However, doing so would incur a performance penalty because a large number of bytes would need to be read, filtered, and resized to fit within the cell. A better idea is to create and use a thumbnail of the image instead.
To create a thumbnail of a Possession image, you are going to draw a scaled-down version of the full image to an offscreen context and keep a pointer to that new image inside a Possession instance. You’ll create this thumbnail when you take a photo and save the image for a Possession. However, this application will only create a thumbnail when an image is taken, and, if the user exits the application, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access