tests/testthat/test-complex-RGB.R

context("Reading complex RGB images")

require(pixmap)

test_that("complex RGB BMP image as pixmap is identical to pnm loaded by read.pnm", {
      pnmfile=system.file("images/5HT1bMARCM-F000001_seg001_lsm.pnm", package = 'bmp')
      bmpfile=sub("pnm$","bmp",pnmfile)
      # test red green and blue channel separately
      b = read.bmp(bmpfile)
      pb=pixmapRGB(b)
      p = read.pnm(pnmfile)
      expect_that(pb,equals(p))
    })

Try the bmp package in your browser

Any scripts or data that you put into this service are public.

bmp documentation built on May 1, 2019, 9:45 p.m.