pixmap/0000755000176200001440000000000015041063732011551 5ustar liggesuserspixmap/tests/0000755000176200001440000000000015040776451012723 5ustar liggesuserspixmap/tests/logo-ex.R0000644000176200001440000000106712220001271014376 0ustar liggesuserslibrary("pixmap") x <- read.pnm(system.file("pictures/logo.ppm", package="pixmap")[1]) dx <- x@size chx <- getChannels(x) stopifnot(is(x, "pixmap"), is(x, "pixmapRGB"), dx == c(77, 101), dim(chx) == c(dx, 3)) par(mfrow = c(2,2)) plot(x, main = "R logo pixmap") for(j in 1:3) plot(pixmapGrey(chx[,, j]), main=paste("channel",j)) x1 <- as(x, "pixmapGrey") z <- getChannels(x1) stopifnot(is(z, "matrix"), dim(z) == dx) x2 <- as(x1, "pixmapRGB") z <- getChannels(x2) stopifnot(is(z, "array"), dim(z) == c(dx, 3)) pixmap/tests/bugs.R0000644000176200001440000000150415040776451014006 0ustar liggesuserslibrary("pixmap") ## this triggered a bug in R <= 1.9.1 x <- pixmapIndexed(rep(1:8, 9), nrow=6, col=hsv(runif(8),runif(8),runif(8))) plot(x) print(x) file <- tempfile() write.pnm(x, file=file) unlink(file) ###********************************************************** # coercion of indexed -> RGB x1 <- as(x, "pixmapRGB") x2 <- as(x1, "pixmapIndexed") x3 <- as(x2, "pixmapRGB") all.equal(x, x2) all.equal(x1, x3) ###********************************************************** ## plotting images with only 1 column or row ## (from bug report by Robert Esswein) library("pixmap") ## Vertical colorbar: pm <- pixmapIndexed(matrix(1:16,ncol=1,nrow=16), col = rep(palette(), length.out = 16)) plot(pm) ## Horizontal colorbar attempt: pm <- pixmapIndexed(matrix(1:16,ncol=16,nrow=1), col = rep(palette(), length.out = 16)) plot(pm) pixmap/tests/bugs.Rout.save0000644000176200001440000000334715040777213015477 0ustar liggesusers R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library("pixmap") > > ## this triggered a bug in R <= 1.9.1 > > x <- pixmapIndexed(rep(1:8, 9), nrow=6, col=hsv(runif(8),runif(8),runif(8))) > plot(x) > print(x) Pixmap image Type : pixmapIndexed Size : 6x12 Resolution : 1x1 Bounding box : 0 0 12 6 Nr. of colors : 8 of 8 > file <- tempfile() > write.pnm(x, file=file) > unlink(file) > > ###********************************************************** > > # coercion of indexed -> RGB > > x1 <- as(x, "pixmapRGB") > x2 <- as(x1, "pixmapIndexed") > x3 <- as(x2, "pixmapRGB") > all.equal(x, x2) [1] TRUE > all.equal(x1, x3) [1] TRUE > > ###********************************************************** > > ## plotting images with only 1 column or row > ## (from bug report by Robert Esswein) > > library("pixmap") > > ## Vertical colorbar: > pm <- pixmapIndexed(matrix(1:16,ncol=1,nrow=16), col = rep(palette(), length.out = 16)) > plot(pm) > > ## Horizontal colorbar attempt: > pm <- pixmapIndexed(matrix(1:16,ncol=16,nrow=1), col = rep(palette(), length.out = 16)) > plot(pm) > > proc.time() user system elapsed 0.318 0.035 0.343 pixmap/MD50000644000176200001440000000166215041063732012066 0ustar liggesusers3805aa96ce4cf1abcce3e362b726e6d9 *DESCRIPTION 08e9d985024225304139d286a5af35e9 *NAMESPACE c3ead51ea4c66e7c9cd156e61548f7fb *NEWS.md 092a09aecda6cacda64aa1631f1f29e3 *R/AAA-classes.R 0dc807db43774c2f43f475caba493b72 *R/addlogo.R 38a09ad3eb237d3dba22199b36474dc4 *R/pixmap.R 5a440b93c2d128b44021facf8866457b *R/pnm.R 9b5d489330fef2268dbc3872e6527fb9 *R/pnmhead.R 94cd098d86d1ed854d170e249ef39346 *inst/pictures/logo.pbm 5519a1cdba7cb6dd0e5faa4311074bb6 *inst/pictures/logo.pgm 4b6c8608d0ff023b30aaa4eb7509e706 *inst/pictures/logo.ppm 199384a702fac327a13ddba55c925133 *man/addlogo-methods.Rd 7f47abc47082a912bcadeb4d25e405c1 *man/channels-methods.Rd 1caac753df8662361e906913535f170c *man/pixmap-class.Rd dd37e4a31da53ed7574fabbb8ab8d077 *man/pixmap.Rd dec9b907b4e75e9c72f8f87aec7ee117 *man/pnm.Rd 967f7212b3824a81ba3aac8576053ca3 *tests/bugs.R e957ead37def45015580f08cf4895597 *tests/bugs.Rout.save bee583190f221eb909fd2bd10065c34d *tests/logo-ex.R pixmap/R/0000755000176200001440000000000015040777216011762 5ustar liggesuserspixmap/R/pixmap.R0000644000176200001440000002011615040776571013406 0ustar liggesusers setMethod("show", "pixmap", function(object){ cat("Pixmap image\n") cat(" Type :", class(object), "\n") cat(" Size :", paste(object@size, collapse="x"), "\n") cat(" Resolution :", paste(object@cellres, collapse="x"), "\n") cat(" Bounding box :", object@bbox, "\n") if(is(object, "pixmapIndexed")) cat(" Nr. of colors :", length(unique(as(object@index, "vector"))), "of", length(object@col), "\n") cat("\n") }) setMethod("plot", "pixmap", function(x, y, xlab="", ylab="", axes=FALSE, asp=1, ...){ x = as(x, "pixmapIndexed") X <- seq(x@bbox[1], x@bbox[3], by=x@cellres[1]) Y <- seq(x@bbox[2], x@bbox[4], by=x@cellres[2]) image(x=X, y=Y, z=t(x@index[nrow(x@index):1,,drop=FALSE]), col=x@col, xlab=xlab, ylab=ylab, axes=axes, asp=asp, ...) }) ###********************************************************** pixmap <- function(data=NULL, nrow=dim(data)[1], ncol=dim(data)[2], bbox=NULL, bbcent=FALSE, cellres=NULL) { if(!is.null(cellres)) cellres <- rep(cellres, length.out = 2) if(is.null(bbox)){ if(is.null(cellres)) cellres <- c(1,1) if(is.null(nrow)){ if(!is.null(ncol)) nrow <- ceiling(length(data)/ncol) else stop("Too few dimension attributes (nrow, ncol, bbox)\n") } else if(is.null(ncol)) ncol <- ceiling(length(data)/nrow) if(bbcent) bbox <- c(1,1,cellres[1]*ncol, cellres[2]*nrow) else bbox <- c(0,0,cellres[1]*ncol, cellres[2]*nrow) } else{ if(is.null(cellres)){ if(is.null(nrow)){ if(!is.null(ncol)) nrow <- ceiling(length(data)/ncol) else stop("Too few dimension attributes (nrow, ncol, bbox)\n") } else if(is.null(ncol)) ncol <- ceiling(length(data)/nrow) cellres = .getCellres(bbox, bbcent, c(nrow, ncol)) } else{ if(bbcent){ ncol <- (bbox[3]-bbox[1])/cellres[1]+1 nrow <- (bbox[4]-bbox[2])/cellres[2]+1 } else{ ncol <- (bbox[3]-bbox[1])/cellres[1] nrow <- (bbox[4]-bbox[2])/cellres[2] } } } new("pixmap", size=as(c(nrow, ncol),"integer"), cellres=cellres, bbox=bbox, bbcent=bbcent) } pixmapGrey = function(data, ...) { z = new("pixmapGrey", pixmap(data, ...)) datamax <- max(data) datamin <- min(data) data <- as.numeric(data) if(datamax>1 || datamin<0) data <- (data - datamin)/(datamax-datamin) z@grey = matrix(data, nrow=z@size[1], ncol=z@size[2]) z } pixmapRGB = function(data, ...) { z = new("pixmapRGB", pixmap(data, ...)) datamax <- max(data) datamin <- min(data) data <- as.numeric(data) if(datamax>1 || datamin<0) data <- (data - datamin)/(datamax-datamin) data = array(data, dim=c(z@size[1], z@size[2], 3)) z@red = matrix(data[,,1], nrow=z@size[1], ncol=z@size[2]) z@green = matrix(data[,,2], nrow=z@size[1], ncol=z@size[2]) z@blue = matrix(data[,,3], nrow=z@size[1], ncol=z@size[2]) z } pixmapIndexed = function(data, col=NULL, ...) { z = new("pixmapIndexed", pixmap(data, ...)) data <- as(data, "integer") datamin <- min(data) if(datamin<=0) data <- data - datamin + 1 datamax <- max(data) z@index = matrix(data, nrow=z@size[1], ncol=z@size[2]) if(is.null(col)) col <- heat.colors(datamax) else{ if(is(col,"function")) col <- col(datamax) else { if(length(col) < datamax){ warning("number of of colors smaller than number of data values, recycling\n") col <- rep(col, length.out = datamax) } } } z@col = col z } ###********************************************************** setAs("pixmapGrey", "pixmapRGB", function(from, to){ z = new(to, as(from, "pixmap")) z@red = from@grey z@green = from@grey z@blue = from@grey z@channels = c("red", "green", "blue") z }) setAs("pixmapRGB", "pixmapGrey", function(from, to){ addChannels(from) }) setAs("pixmapRGB", "pixmapIndexed", function(from, to){ z = new(to, as(from, "pixmap")) x = rgb(from@red,from@green,from@blue) col <- unique(x) x <- match(x, col) z@index <- matrix(x, nrow=z@size[1], ncol=z@size[2]) z@col = col z }) setAs("pixmapGrey", "pixmapIndexed", function(from, to){ z = new(to, as(from, "pixmap")) x = grey(from@grey) col <- unique(x) x <- match(x, col) z@index <- matrix(x, nrow=z@size[1], ncol=z@size[2]) z@col = col z }) setAs("pixmapIndexed", "pixmapRGB", function(from, to){ z = new(to, as(from, "pixmap")) x <- col2rgb(from@col[from@index])/255 z@red <- matrix(x["red",], nrow=z@size[1], ncol=z@size[2]) z@green <- matrix(x["green",], nrow=z@size[1], ncol=z@size[2]) z@blue <- matrix(x["blue",], nrow=z@size[1], ncol=z@size[2]) z@channels = c("red", "green", "blue") z }) ## the fallbacks: convert to RGB and then to target setAs("ANY", "pixmapGrey", function(from, to){ as(as(from, "pixmapRGB"), to) }) setAs("ANY", "pixmapIndexed", function(from, to){ as(as(from, "pixmapRGB"), to) }) ###********************************************************** setGeneric("addChannels", function(object, coef=NULL) standardGeneric("addChannels")) ## coercion from RGB to Grey calls addChannels, hence be careful when ## using as() methods (danger of infinite loops). setMethod("addChannels", "pixmapRGB", function(object, coef=NULL){ if(is.null(coef)) coef = c(0.30, 0.59, 0.11) z = new("pixmapGrey", object) z@grey = coef[1] * object@red + coef[2] * object@green + coef[3] * object@blue z@channels = "grey" z }) setGeneric("getChannels", function(object, colors="all") standardGeneric("getChannels")) setMethod("getChannels", "pixmapChannels", function(object, colors="all"){ for(k in 1:length(colors)) colors[k] = match.arg(colors[k], c("all", object@channels)) if(any(colors=="all")) colors = object@channels colors = unique(colors) if(length(colors)>1){ z = array(0, dim=c(object@size, length(colors))) dimnames(z) = list(NULL, NULL, colors) for(k in colors){ z[,,k] = slot(object, k) } } else{ z = slot(object, colors) } z }) ###********************************************************** setMethod("[", "pixmap", function(x, i, j, ..., drop=FALSE){ if(missing(j)) j = TRUE if(missing(i)) i = TRUE osize = x@size if(is(x, "pixmapIndexed")){ x@index = x@index[i,j,drop=FALSE] x@size = dim(x@index) } else if(is(x, "pixmapChannels")){ for(k in x@channels) slot(x, k) = slot(x, k)[i,j,drop=FALSE] x@size = dim(slot(x, k)) } else stop(paste("Cannot subset objects of class", class(x))) ## now we re-calculate bounding box and cellres bbox = numeric(4) if(x@bbcent){ b = seq(x@bbox[1], x@bbox[3], length=osize[2]) bbox[c(1,3)] = range(b[j]) b = seq(x@bbox[2], x@bbox[4], length=osize[1]) bbox[c(2,4)] = range(b[i]) } else{ b = seq(x@bbox[1], x@bbox[3]-x@cellres[1], length=osize[2]) bbox[1] = min(b[j]) bbox[3] = max(b[j]) + x@cellres[1] b = seq(x@bbox[2], x@bbox[4]-x@cellres[2], length=osize[1]) bbox[2] = min(b[i]) bbox[4] = max(b[i]) + x@cellres[2] } x@bbox = bbox x@cellres <- .getCellres(bbox, x@bbcent, x@size) x }) .getCellres = function(bbox, bbcent, size) { if(bbcent) cellres = c((bbox[3]-bbox[1])/(size[2]-1), (bbox[4]-bbox[2])/(size[1]-1)) else cellres = c((bbox[3]-bbox[1])/size[2], (bbox[4]-bbox[2])/size[1]) cellres } pixmap/R/pnmhead.R0000644000176200001440000000301512220001271013472 0ustar liggesusersread.pnmhead <- function(con) { seek(con, 0) pm.getc <- function(con) { ch <- readChar(con, nchars=1) if (ch == "#") { ch <- readChar(con, nchars=1) while (ch != '\n' && ch != '\r') { ch <- readChar(con, nchars=1) } } ch } pm.getuint <- function(con) { ch <- pm.getc(con) while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') { ch <- pm.getc(con) } if (ch < '0' || ch > '9') stop("junk in file where an unsigned integer should be") i <- 0 while (ch >= '0' && ch <= '9') { digitVal <- as.integer(ch) i <- i * 10 + digitVal ch <- pm.getc(con) } i } pm.readmagicnumber <- function(con) { ch <- pm.getc(con) if (ch != "P") stop("Not a PNM format file") ch <- as.integer(pm.getc(con)) if (ch < 1 || ch > 6) stop("Unknown PNM format") ascii <- FALSE if (ch < 4) ascii <- TRUE if (ch == 1 || ch == 4) type <- "pbm" else if (ch == 2 || ch == 5) type <- "pgm" else if (ch == 3 || ch == 6) type <- "ppm" res <- list(type=type, ascii=ascii) res } magic <- pm.readmagicnumber(con) nc <- pm.getuint(con) nr <- pm.getuint(con) if (magic$type != "pbm") maxval <- pm.getuint(con) else maxval <- 1 datastart <- seek(con) seek(con, 0) if (nc < 0 || nr < 0 || maxval < 1 || maxval > 65535) warning(paste("Possible error reading heading: nc:", nc, "nr:", nr, "maxval:", maxval)) res <- list(nc = nc, nr = nr, maxval = maxval, type=magic$type, datastart=datastart, ascii=magic$ascii) invisible(res) } pixmap/R/addlogo.R0000644000176200001440000000162612220001271013475 0ustar liggesusers# setGeneric("addlogo", function(x, ...) standardGeneric("addlogo")) setMethod("addlogo", signature("pixmap"), function(x, px, py=NULL, asp=NULL) { if (is.list(px)) { py <- px$y px <- px$x } else if (is.null(py)) stop("missing py") if (!is.numeric(px) || !is.numeric(py)) stop("non-numeric coordinates") if ((nx <- length(px)) <= 1 || nx != length(py) || nx > 2) stop("invalid coordinate lengths") if (!is.null(asp) && asp <= 0) stop("asp must be greater than zero") obb <- x@bbox x@bbox[1] <- min(px) x@bbox[2] <- min(py) x@bbox[3] <- max(px) if (is.null(asp)) { x@bbox[4] <- max(py) } else { prop <- (x@bbox[3] - x@bbox[1]) / (obb[3] - obb[1]) x@bbox[4] <- x@bbox[2] + prop*asp*(obb[4] - obb[2]) } x@cellres[1] <- (x@bbox[3] - x@bbox[1]) / x@size[2] x@cellres[2] <- (x@bbox[4] - x@bbox[2]) / x@size[1] plot(x, add=TRUE) invisible(x) }) pixmap/R/AAA-classes.R0000644000176200001440000000201413715303427014113 0ustar liggesuserssetClass("pixmap", representation(size="integer", cellres="numeric", bbox="numeric", bbcent="logical"), prototype(size=integer(2), cellres=numeric(2), bbox=numeric(4))) setClass("pixmapChannels", representation(channels="character"), contains="pixmap") setClass("pixmapGrey", representation(grey="matrix"), contains="pixmapChannels", prototype=prototype(new("pixmap"), channels="grey")) setClass("pixmapIndexed", representation(index="matrix", col="character"), contains="pixmap", prototype=prototype(new("pixmap"))) setClass("pixmapRGB", representation(red="matrix", green="matrix", blue="matrix"), contains="pixmapChannels", prototype=prototype(new("pixmap"), channels=c("red", "green", "blue"))) pixmap/R/pnm.R0000644000176200001440000000746513715303427012707 0ustar liggesusersread.pnm <- function(file, ...) { fsz <- file.info(file)$size con <- file(file, open="rb") pnmhead <- read.pnmhead(con) retval <- read.pnmdata(con, pnmhead, ...) if (fsz != seek(con)) warning("Possible reading error: file size ", fsz, " bytes, but ", seek(con), " bytes read") close(con) retval } read.pnmdata <- function(con, pnmhead, ...) { ds <- pnmhead$datastart seek(con, ds) type <- pnmhead$type nl <- ifelse(type == "ppm", 3, 1) nc <- pnmhead$nc nr <- pnmhead$nr ncells <- nl*nc*nr if (pnmhead$ascii) { xx <- scan(con, integer(0), n=ncells) } else { if (type == "pbm") { ## black & white, i.e. pixel = bit BytesPerRow <- ceiling(nc/8) bxx <- readBin(con, "integer", n=nr*BytesPerRow, size=1, signed=FALSE) as.integer.bytes <- function (x) { ## unpacks bytes in 0:255 into {0,1} integers n <- length(x <- as.integer(x)) if (any(x < 0) || any(x > 255)) stop("Not an unsigned byte (value outside 0:255)") ans <- matrix(integer(8 * n), 8, n) two <- as.integer(2) for (i in 8:1) { ans[i,] <- x %% two x <- x %/% two } ans } xx <- as.integer.bytes(bxx) ncb <- BytesPerRow*8 xx <- 1 - array(xx, c(nl, ncb, nr))[,1:nc,] } else { xx <- readBin(con, "integer", n=ncells, size=1, signed=FALSE) } } res <- array(xx, dim = c(nl, nc, nr)) / pnmhead$maxval if(nl==1) { ## non-RGB: ##FIXME(MM): use "indexed" for B&W z = pixmapGrey(t(res[1,,]), ...) } else{ z = pixmapRGB(0, ncol=dim(res)[2], nrow=dim(res)[3], ...) z@red = t(res[1,,]) z@green = t(res[2,,]) z@blue = t(res[3,,]) } z } write.pnm <- function(object, file=NULL, forceplain=FALSE, type=NULL, maxval=255) { if(!is(object, "pixmap")) stop("Can only write pixmap objects") if(is.null(type)) type <- if(is(object, "pixmapGrey")) "pgm" else "ppm" else type <- match.arg(type, c("pbm", "pgm", "ppm")) do <- object@size switch(type, "pbm" = { object <- as(object, "pixmapGrey") object <- t(object@grey < 0.5) storage.mode(object) <- "integer" code <- 4 forceplain <- TRUE }, "pgm" = { object <- as(object, "pixmapGrey") object <- t(round(object@grey*maxval, 0)) storage.mode(object) <- "integer" code <- 5 }, "ppm" = { object <- as(object, "pixmapRGB") object1 <- array(0, dim=c(3, do[2], do[1])) object1[1,,] <- t(object@red) object1[2,,] <- t(object@green) object1[3,,] <- t(object@blue) object <- object1 object <- round(object*maxval, 0) storage.mode(object) <- "integer" code <- 6 }) if (is.null(file)) file <- paste("Rimage.", type, sep="") comment <- "# R write.pnm output" if(forceplain) { con <- file(file, open="w") code <- code - 3 cat("P", code, "\n", file=con, sep="") cat(comment, "\n", file=con, sep="") cat(do[2], " ", do[1], "\n", file=con, sep="") if (type != "pbm") cat(maxval, "\n", file=con, sep="") write(object, ncolumns=3, file=con) } else { con <- file(file, open="wb") writeChar(paste("P", code, "\n", sep=""), con=con, eos=NULL) writeChar(paste(comment, "\n", sep=""), con=con, eos=NULL) writeChar(paste(do[2], " ", do[1], "\n", sep=""), con=con, eos=NULL) if (type != "pbm") writeChar(paste(maxval, "\n", sep=""), con=con, eos=NULL) writeBin(as.integer(as.vector(object)), con, size=1) } close(con) } pixmap/NAMESPACE0000644000176200001440000000022614613010124012757 0ustar liggesusersimportFrom("grDevices", "col2rgb", "grey", "heat.colors", "rgb") importFrom("graphics", "image", "plot") import("methods") exportPattern("^[^\\.]") pixmap/NEWS.md0000644000176200001440000000622515040777066012667 0ustar liggesusers# pixmap 0.4-14 * In test `bugs.R` only show differences (if any) rather than making the test fail. * Improve `rep()` calls in `pixmap()` to avoid replicating `NULL` vectors and to avoid partial argument matching. # pixmap 0.4-13 * Achim Zeileis takes over maintenance from Friedrich Leisch. # pixmap 0.4-12 * Fixed some `NAMESPACE` problems. # pixmap 0.4-11 * Added dummy `NAMESPACE` file. * Move class definitions to separate file, no `Collate` in `DESCRIPTION`. # pixmap 0.4-10 * Explicitly mention in the help file that `read.pnm` only works for files, not other conntection. * Fixed a bug in `write.pnm` that tried to open the same connection twice. # pixmap 0.4-9 * Fixed a minor glitch in `write.pnm`. # pixmap 0.4-8 * Fixed a bug that prevented plotting images with only 1 row (bug report by Robert Esswein). # pixmap 0.4-7 * Use `LazyLoad` instead of `SaveImage`. # pixmap 0.4-6 * Modified one of the regression tests for changes in R 2.4: `terrain.colors()` now return transparency information -> do not use it in example. # pixmap 0.4-5 * Standardized license field in `DESCRIPTION` file. # pixmap 0.4-4 * Fixed a bug in the prototype of class `"pixmap"`. # pixmap 0.4-3 * New example for overlaying plots in `help(pixmap)` submitted by Stephan Matthiesen. # pixmap 0.4-2 * Adjust for R 2.0.0. * Fixed a bug in coercion from `pixmapIndexed` to `pixmapRGB`. * There was a bug in the `methods` package of R 1.9.x which was triggered by functions in `pixmap`, hence this version of the package depends on R >= 2.0.0. # pixmap 0.4-1 * Fixed a bug in `write.pnm()` that wrote grey images in PPM format. * The channel information was not changed when converting between RGB and grey pixmaps. * The `maxval` in PNM headers must be less than `65536`, not less than `256`. # pixmap 0.4-0 * `read.pnm()`: Vectorized (and renamed) `as.integer.bytes()` which provides a huge performance gain for reading "PBM" (b/w bitmaps). * New function `addlogo()`. # pixmap 0.3-4 * Clarified documentation of `read.pnm` (file name extensions are ignored). # pixmap 0.3-3 * Fixed some codoc problems (missing aliases). # pixmap 0.3-1 * `read.pnm()`: Changes made to function reading and parsing PNM file headers to permit comments of arbitrary length. # pixmap 0.3-0 * The whole package has moved to S4 classes and methods, hence all classes have a new representation. This also means that the code and the API are not fully backwards compatible with earlier versions of the package. * Added support for subsetting, see `example(pixmap)`. * New: `addChannels()` and `getChannels()`. # pixmap 0.2-1 * pixmap(): - Added arguments `bbcent` and `cellres`. - `nrow` and `ncol` default to the respective dimensions of the data argument (if present). Hence, pixmap does the expected when given a matrix or an array. - `data` is rescaled to [0,1] for RGB and grey, and coerced to positive integers for indexed. - `col` can also be a function like `rainbow()` # pixmap 0.1-2 * Fixed bugs in plotting, `read.pnm` and `write.pnm` which confused dimensions (rows versus columns), but together let plots look OK. pixmap/inst/0000755000176200001440000000000013715303427012532 5ustar liggesuserspixmap/inst/pictures/0000755000176200001440000000000012220001271014346 5ustar liggesuserspixmap/inst/pictures/logo.pbm0000644000176200001440000000176312220001271016015 0ustar liggesusersP4 101 77 p>~?|><'0x8'<??`>'`~p|p|0000000x |  `| 0|8@>p>@>|?0? >~80?~<`?8Fpx!`|1&=<?&@x|<?G$x???pixmap/inst/pictures/logo.pgm0000644000176200001440000001723412220001271016022 0ustar liggesusersP5 # CREATOR: The GIMP's PNM Filter Version 1.0 101 77 255 ¾½̹ɶŜxohfca`_]\\]\dipz׮{vl[WOF?86513333578;=@DHUdozw̝{sx|~zgWI<5&#"$%)-25ԋRBLOi|{ehURUgv5нƼEWOiwupXULPVm;D̵޻^`Thz^hcjR@bwy7ݷɼndbztf_uǁTHZr{CмeokxZgގ[EFyӌ> y{|~{xz~yx}˰|jtkyfcpiMJUݥY(j]mmonlnz~}sjffl|{muu}yjTڈYLUmx1tyz{{}Ż~ywxvdtpr\ۼgNM_ԗQxŪ|}l_jc|lYז_HVnm*oq{ҠT9#$"#%-$$+6Ggz[URzo_ʼxbG`֞K yߎ/  '>dd?O[esҹsPQeu3r̹T$  ")7[zmGKW杘cpվ˯oPWpدf0 "sN$ _jjm^dZiuc;+7@6StvJGG󭚅fiϸţkQ_|ސ\'PsL(0?8GOnL;:ʤpcʴkSdԊQ"sM0-7q[l~K-9}갛}bǰoWeA +sO22>su{J'9rcȮu[j=sM0)Aي|K)4rgʬz`lŀG"rL-3NꗞuE)0zo̪}co¿uN&5rM.#Bꚭp>$/v㧖ph¿O%(2rN,*Fܳuy|ƴj:!,맓yjüX2+,rQ..Oʡ}uִZ)'zqx¶fB1,rU03Tndו9+lˍ}uvN77]rbD\pp{k"Rպ铊~X;ACr~rwyĸyi~Dǯw|kFG:srƆmM 7潎nې|[LDPrܿ~}bt\ &Ρ}~|nRSI`rӮ{knkڏVF޵׉wvpgTRIr|{|}}vwnigbbo͌^7 >켜kstqm~fZU`r~}sqvwy؊O%,Ϫhsgm|flMnrǬ2 Vܯ}khiivnqXxrìûʹ_+ $ˆw}Yd_fujwarԗD3#!,8FRĦN HެqvS_^`kycwrݏ0.5ZU/S̯eua_Y]rh}sy|rӻh%:Uxg?QyԜx{jO\SXf|{s{rW$#HjmS9/216Vj콍d|NNNSZivG/+2V0FP_{պdgږXTHNUWp줙oxH/-6RSXw|nj^mLaN7GQUhw}H0>GuKa`ygo\IgG>>BJSXaqnH/4GZdxxqk`M>6668>EKVanwH/1<¾γгvear}b]g҂SM9.3869ATTWe{vvH//?ȦhKn~mdYu|W889.+4*5BGIQan~G/(DüǼǤqq^ssYgIiA51+),,)&)29;wM1-?vueUms]jbSfoșb97,$%,,",oP2,9^XHKGDF9<8 1]jgl}a`jrC&"(+*jN-3E#1&*!)%%/QshanW^iѥqC)DoM.+<%"&!+gghq_VZuO28@ohdogzsYc_tK/%K{nck~Y`SvI*+FnghʻgY\k~֮M,*Gpllfо[[ZϼS')S_agcȶk]Rit`\o_ade`P9)(D|j]b\^]_bdb_[WTP_[oC$(/?^fB0#&/QSdiB  #9g/ &CWL% 8MI>0@Rǰpixmap/inst/pictures/logo.ppm0000644000176200001440000005553612220001271016042 0ustar liggesusersP6 # CREATOR: The GIMP's PNM Filter Version 1.0 101 77 255 ʿȽĹƾļ·ööøʿļøĻźȽĹöŸĸ¶ʿźʿʿɾɾɾȽȽǿɿǿǿǿƼƼûɽǻǻȼþ¿Ŀþ½¿¿¿̾ʺʼʼĻļ˿~ǹzsx{josbik]eiZdfY`dVacV^bT^`S[_Q]_R\`R]_RegZjl_qsfz|qzþ˯yz}}sxyuyjkoaX_OVZKLSCEI:528.#) &"  ! !# #%"#'&&+'*/+130664<=8NMIda\xtq{zŒwppdnndssi~~tmni_a^RTS>@?-.0#$&     #!! %"#(#$)#$("""44243.880DC>QPKda\xup{vsytq~{ͥ}}sllbddZii_~~tɸ~{vfe`POK==;%%%      #"'! &#"(#"*%$,&%+('/)(0*)1&%-"!'! (#"*%$*#"'!!#((& !!!,,$761<;6IFAURMwto~{v~yuytp}jidǿ٨}}sgg]^^T``VxxpŽþwsp[ZVCB>('#! 0.3TRWvtwη}{b`eKIL869-+,..,+,&,-%12*-.&()!//'<<4DD5OLCc_Txti{ywkldbc]ឞxxpXXPTTL^^Vrrj̢qplED@%$" 00.qrmէNNLDC??>9DA:LIBUQHfcZxulyzryzrqrl]^X}|wݙ``VRRHTTJkkc~ŽXWS320 647oomCB@;:6DA?֍SRPDC?NMIQPKjkc}~v}{|vef`hicۘWWKTTJWWMii_z絴xws762޸귾贻岺᰺ްߺ춿貹㯸߱೻⵽곻ߪ԰ַFFDWXSOPJjkc{xyquvppqkXYSWWKNNBRRFXXNy幸onj=<8FDE͹冀۳笸⯺篺诹ꭷ謷嬷䯻崽讹殹殹箹箹箹筸殹窵㬷尻鱼걼鱼걼鳻驲ݧ٫ۮި؞˞ȩϟ⻼__]`a[UVNijbz{u^_Yhiccd^ll`STFAB4cdVyymﶵ{zv875·ػ߼鱼ܵ౻ަآ֣נԚЕɑÌnojde_bc]{{|tuvngh``aYuvpɿwVVJIJ<[\Nstf}|xDCA螬ٕҏ̍Ɏƃef`opjlmeyzr[\Tghb֐]]SGG;GH:z{mŹ̎@?; xΞ{xk|l}m}q}pyowqzu~pyv}}yw{}zxxyyxxnwq}xǚԬ̅p|_jtuolme|yztfgade]pqk˾Ϳ๹kkaOOELLBWWK֧[ZV(((Řʃӎ\lN_}^o]p`oam`kemqz|{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;6:>=5:="(+2,5$,9CGPdo[i\ir|Ԣ߱㞬ә̂`fTXsYZojiy~ٞr}DNi&-@%+9DHQiqbmalZg➩|TZtXZqXYkϛϕǧ݆JTm!(;$*6QT[V`{Xa^fYcĚ̹魶՚ckW]sLSedjz~ksW_S[foV_~Xa~[d^eY`zIPj2:O$*:$(3CDIu}ciU\y[aS\}W]T]~X^~[a^c\a~X_yS[rPXmMUhIQdW`qU\lgn;B_:33101.-0%2#)5,09>?CY^q`f|), Friedrich Leisch [aut] (ORCID: , maintainer 2001-2024), Martin Maechler [aut] (ORCID: ), Achim Zeileis [cre] (ORCID: ) Maintainer: Achim Zeileis Repository: CRAN Date/Publication: 2025-07-26 05:30:02 UTC