Learn R Programming

x3ptools (version 0.0.2)

y_flip_x3p: Flip the y coordinate of an x3p image

Description

One of the major changes between the previous two ISO standards is the way the y axis is defined in a scan. The entry (0,0) used to refer to the top left corner of a scan, now it refers to the bottom right corner, which means that all legacy x3p files have to flip their y axis in order to conform to the newest ISO norm.

Usage

y_flip_x3p(x3p)

Arguments

x3p

x3p object

Value

x3p object in which the y coordinate is reversed.

Examples

Run this code
# NOT RUN {
logo <- read_x3p(system.file("csafe-logo.x3p", package="x3ptools"))
dim(logo$surface.matrix)
# }
# NOT RUN {
image_x3p(logo)
# }
# NOT RUN {
# flip the y-axis for the old ISO standard:
logoflip <- y_flip_x3p(logo)
dim(logoflip$surface.matrix)
# }
# NOT RUN {
image_x3p(logoflip)
# }

Run the code above in your browser using DataLab