Meta tags:
Headings (most frequently used words):
support, for, raster, output, in, graphics, background, recent, changes, issues, solutions, applications, status,
Text of the page (most frequently used words):
the (51), yes (26), for (23), #raster (20), image (18), support (16), images (16), device (15), you (13), not (11), graphics (11), can (11), that (10), this (10), and (10), with (9), nri (8), only (8), windows (8), interpolation (7), pixels (7), but (7), like (7), engine (6), alpha (6), things (6), drawing (6), there (5), also (5), rotation (5), from (5), because (5), some (5), x11 (5), scaling (5), get (5), has (5), transparent (4), are (4), these (4), fill (4), pdf (4), output (4), devices (4), via (4), means (3), possible (3), postscript (3), which (3), bitmap (3), opaque (3), does (3), fully (3), possibly (3), level (3), three (3), original (3), background (3), one (3), used (3), gradient (3), text (3), generate (3), example (3), draw (3), been (3), use (3), file (3), them (3), package (3), size (3), feature (2), implement (2), full (2), cairo (2), more (2), small (2), dpi (2), may (2), number (2), other (2), drawn (2), cannot (2), pixel (2), graphapp (2), addition (2), have (2), two (2), regions (2), rotated (2), colour (2), set (2), xfig (2), cap (2), all (2), ability (2), using (2), ge_cap (2), vector (2), into (2), filling (2), gradients (2), any (2), when (2), added (2), make (2), quite (2), rotating (2), seems (2), transparency (2), function (2), grid (2), user (2), read (2), paul (2), auckland (2), applicable, real, intention, plan, immediate, future, attempt, nyi, yet, implemented, requires, version, otherwise, done, much, crappily, cope, less, than, about, 10k, 100x100, note, relies, currently, radically, increase, hand, interpolating, decrease, high, res, semitransparent, constant, across, entire, per, api, alphablend, structures, shades, either, single, semitransparency, words, different, levels, long, introduces, outside, new, taken, bad, introduced, invisible, though, will, typically, still, artifacts, edges, smooth, channel, worse, must, best, match, pictex, quartz, status, those, along, arrange, layout, facilities, start, think, playground, manipulation, probably, slow, convenient, work, imagemagick, interesting, screen, rasterizes, including, antialiasing, then, reading, back, doing, fun, mask, might, really, good, way, wild, too, encouraged, play, generating, simple, bars, barplots, fake, bullet, points, plotting, symbols, plus, matrix, address, individual, useful, producing, html, maps, possibility, smaller, files, described, motivation, applications, allow, nearest, neighbour, bilinear, they, perform, relevant, operations, themselves, solutions, varies, lot, between, strange, where, memory, main, refers, external, containing, raw, extensions, even, code, src, modules, tightly, focused, providing, library, provide, scale_image, semi, issues, reasons, explained, below, capturing, rendering, ge_raster, width, height, angle, recent, changes, time, pixmap, however, had, primitives, performed, tiny, rectangle, each, major, problems, occurs, rendered, differs, natural, sort, produced, based, format, such, out, control, ebimage, bioconductor, could, variety, formats, was, view, specific, viewer, stat, murrell, department, statistics, university,
Text of the page (random words):
support for raster output in r graphics support for raster output in r graphics paul murrell department of statistics the university of auckland paul stat auckland ac nz background it has been possible for some time to read bitmap images into r and draw them via the pixmap package however because r s graphics engine has only had vector drawing primitives drawing raster images via this package is performed by drawing a tiny rectangle for each pixel in the original image this has two major problems no interpolation occurs if the rendered size differs from the natural raster size of the image and when this sort of output is produced in a text based format such as postscript or pdf the file size can get out of control the ebimage bioconductor could also be used to read in bitmap images in a variety of formats but it was only possible to view these on a package specific viewer not draw them on an r graphics device recent changes support has been added to the graphics engine for rendering raster images to graphics devices via a ge_raster image x y width height angle function with grid raster at the user level in addition for reasons explained below there is support for capturing raster images from graphics devices via a ge_cap function with grid cap at the user level issues the support for drawing raster images varies quite a lot between devices for example the graphapp library that we use for drawing on windows only seems to provide support for scaling images scale_image but not for rotating them and it only seems to support full transparency not semi transparency the raw x11 device with no extensions does not even have support for scaling images there is some image rotation and scaling code in src modules x11 rotation c but it is quite tightly focused on providing support for rotating text xfig is a strange one where from memory the main file refers to an external file containing the image solutions support has been added to the graphics engine to allow scaling nearest neighbour interpolation bilinear and rotation of raster images devices can make use of these if they cannot perform the relevant operations themselves for example the x11 device and the windows device make use of all three applications with raster support you get the possibility of smaller pdf files when you draw a raster image to a pdf device and you get interpolation of raster images that are drawn by r as described in the original motivation you also get the ability to address individual pixels in a raster image which is useful for things like producing html image maps you also get encouraged to play with raster images in r for example generating simple things like colour gradients for filling bars in barplots or fake 3d bullet points for plotting symbols plus you can generate any gradient that you like because you can generate any matrix that you like with the ge_cap you also can do some interesting things like drawing vector output to a screen device which rasterizes it possibly including antialiasing then reading that image back into r and doing fun things like using it as a mask on a gradient fill e g filling text with a gradient fill this might be a really good way to generate some wild gradients too all of those along with the ability to arrange raster images using r s layout facilities means that you start to think of r as a playground for raster image manipulation probably a slow one but possibly a more convenient one to work in if you re used to r but not so used to things like imagemagick status device cap raster scaling interpolation rotation alpha quartz yes yes yes yes yes cairo yes yes yes yes yes x11 yes yes yes yes nri windows yes yes yes yes yes pdf na yes yes yes yes postscript na yes yes yes na xfig na nri nri nri na pictex na nri nri nri na rotation of raster images in the graphics engine introduces pixels from outside the original image in the new regions of the rotated image and the colour of these pixels is taken from gc fill this is not so bad on windows because the background can be set to transparent so that these introduced regions are invisible though there will typically still be some artifacts at the edges of the rotated image because the windows device does not support a smooth alpha channel on the x11 device things are worse because images must be opaque so the best you can do is to set gc fill to match the background the windows device can do semitransparent raster images but only if there is a constant alpha across the entire image i e it cannot do per pixel alpha the windows api alphablend can but graphapp s bitmap structures do not support shades of alpha it s either transparent or opaque the windows device does support fully transparent pixels in an image possibly in addition to a single level of semitransparency in other words the image can have up to three different levels of alpha as long as fully transparent and fully opaque are two of the three the postscript device can only cope with small raster images less than about 10k pixels e g 100x100 note that this device also relies on the graphics engine for interpolation currently only to 72 dpi which may radically increase the number of pixels in the image on the other hand interpolating to only 72 dpi may decrease the number of pixels for a high res image drawn small full interpolation support requires cairo version 1 6 otherwise interpolation is done much more crappily by the graphics engine nyi not yet implemented nri no real intention to implement means that there is no plan in the immediate future to attempt to implement this feature for this device na not applicable means that it is not possible to support this feature on this device
|