Package: nara 1.0.2

nara: Native Raster Image Tools

Native rasters are a core R image format which use a compact color representation. This color representation closely aligns with graphics device internals meaning that these images can be rendered quickly. This package provides functions to quickly create, manipulate and composite native rasters.

Authors:Mike Cheng [aut, cre, cph], Julien Vernay [ctb]

nara_1.0.2.tar.gz
nara_1.0.2.zip(r-4.7)nara_1.0.2.zip(r-4.6)nara_1.0.2.zip(r-4.5)
nara_1.0.2.tgz(r-4.6-x86_64)nara_1.0.2.tgz(r-4.6-arm64)nara_1.0.2.tgz(r-4.5-x86_64)nara_1.0.2.tgz(r-4.5-arm64)
nara_1.0.2.tar.gz(r-4.7-arm64)nara_1.0.2.tar.gz(r-4.7-x86_64)nara_1.0.2.tar.gz(r-4.6-arm64)nara_1.0.2.tar.gz(r-4.6-x86_64)
nara_1.0.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
nara/json (API)

# Install 'nara' in R:
install.packages('nara', repos = c('https://coolbutuseless.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/coolbutuseless/nara/issues

Datasets:
  • deer - Deer images - a list of native raster images
  • tileset - A list of nativeraster tiles used for constructing a side-scrolling game.
  • tileset_config - A data.frame of configuration information which can be used with 'nr_blit_multi()' and the 'tileset' data.

On CRAN:

Conda:

gfxgraphicspkg

7.89 score 63 stars 51 scripts 40 exports 1 dependencies

Last updated from:96b4d04ed0. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK112
linux-devel-x86_64OK118
source / vignettesOK225
linux-release-arm64OK115
linux-release-x86_64OK124
macos-release-arm64OK110
macos-release-x86_64OK292
macos-oldrel-arm64OK89
macos-oldrel-x86_64OK243
windows-develOK94
windows-releaseOK109
windows-oldrelOK144
wasm-releaseOK105

Exports:array_to_nris_nativerastermagick_to_nrmatrix_to_nrnr_blitnr_blit_multinr_circlenr_color_replacenr_copynr_copy_intonr_cropnr_crop2nr_desaturatenr_dithernr_fillnr_fliphnr_flipvnr_linenr_mask_beginnr_mask_endnr_newnr_new_fromnr_pointnr_polygonnr_polylinenr_rectnr_resizenr_rotatenr_scalenr_text_mononr_thresholdnr_to_arraynr_to_magicknr_to_rasternr_transposenr_tri_coordsnr_tri_meshnrs_to_gifnrs_to_mp4raster_to_nr

Dependencies:colorfast

Triangles
Demo setup | Render triangles with nr_polygon() | Render triangles with nr_tri_mesh() | Render triangles with nr_tri_coords()

Last update: 2026-05-14
Started: 2026-05-13

Using Masks

Last update: 2026-05-14
Started: 2026-05-12

Blitting
nr_blit() | Blit a single image | Blit a single image to multiple locations | Blit a single image to multiple locations with varying angles and scales | nr_blit_multi() | Blit with a mask

Last update: 2026-05-13
Started: 2026-05-12

Animation
Render to a video file | Render to a fast graphics device

Last update: 2026-05-12
Started: 2026-05-12

Technical Notes
What is a native raster image and why is it fast? | In-place operation | Anti-aliasing/Interpolation | Dimension ordering | Coordinate System

Last update: 2026-05-12
Started: 2026-05-12

Convert images to/from native raster image format
Create a native raster image | Save/Load native raster images to/from PNG and JPEG | Convert a regular R raster image to/from native raster image format | Convert a regular R array image to/from native raster image format

Last update: 2026-05-07
Started: 2022-07-25

Readme and manuals

Help Manual

Help pageTopics
Deer images - a list of native raster imagesdeer
Check if object is a native raster imageis_nativeraster
Convert a 'magick' image to native raster imagemagick_to_nr nr_to_magick
Convert a numeric matrix to native raster imagematrix_to_nr
Copy a native raster image into another at an arbitrary location, scale and rotationnr_blit
Multiple blit operations in a single callnr_blit_multi
Draw circles on a native raster imagenr_circle
Replace colors in a native raster imagenr_color_replace
Create a new native raster image and copy the dimensions and contents from an existing imagenr_copy
Copy the contents of one native raster image into another.nr_copy_into
Crop a section out of a native raster image into a new imagenr_crop nr_crop2
Move image colors to graynr_desaturate
Dither to binary imagenr_dither
Fill a native raster image with the given colornr_fill
Flip a native raster image horizontallynr_fliph
Flip a native raster image verticallynr_flipv
Draw lines on a native raster imagenr_line
Start/end region of masked drawingnr_mask_begin nr_mask_end
Create a native raster imagenr_new nr_new_from
Draw points on a native raster imagenr_point
Draw multiple polygons on a native raster imagenr_polygon
Draw a polyline on a native raster imagenr_polyline
Draw rectangles on a native raster imagenr_rect
Resize a native raster by specifying the output dimensionsnr_resize
Rotate a native raster image by 90,180,270 degreesnr_rotate
Resize a native raster image using a scale factornr_scale
Draw text on a native raster image using the built-in monospaced bitmapped font.nr_text_mono
Threshold to binary imagenr_threshold
Convert native raster images to/from other R objectsarray_to_nr nr_to_array nr_to_raster raster_to_nr
Transposenr_transpose
Draw multiple triangles from mesh datanr_tri_coords nr_tri_mesh
Convert a list of native rasters to an animated gifnrs_to_gif
Convert a list of native rasters to an mp4 video filenrs_to_mp4
Plot a native raster image (after first clearning the device)plot.nativeRaster
Print methodprint.nativeRaster
A list of nativeraster tiles used for constructing a side-scrolling game.tileset
A data.frame of configuration information which can be used with 'nr_blit_multi()' and the 'tileset' data.tileset_config