image_to_scaled: Scale an image raster array

View source: R/image_to_scaled.r

image_to_scaledR Documentation

Scale an image raster array

Description

Scale the size of an image, in pixel. Process into a data frame.

Arguments

image

A raster array from an image.

size_unit

The unit by which the image will be scaled. Can be one of the following options: 'stitches', 'inches', or 'cm'

img_size

Size of output image, in the unit determined by size_unit. Use a single value (e.g. 48) for a square image. Use a vector of two values for a rectangular image c(width, height).

cloth_count

Specify the aida cloth count to work with. Set to 16 by default.

brightness

A value >1 will increase the brightness of the image while a positive value <1 will decrease the brightness.

warhol

Array of values c(1, 2, 3) associated with R, G, B colour channels. Swap values in array to swap colour channels for a fun visual effect.

Value

A list with element Img_scaled containing a data frame of the x- & y-coordinates, R, G, B channels, and hex colour of each stitch (pixel).


BenjaminVigreux/embroidr documentation built on June 1, 2022, 12:51 a.m.