Questions tagged [raster-graphics]

Use this tag for question about raster graphics (bitmap image)

raster graphics or bitmap image is a dot matrix data structure, representing a generally rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium. Raster images are stored in image files with varying formats

Wiki: https://en.wikipedia.org/wiki/Raster_graphics

32 questions
9
votes
4 answers

Dip when joining blended antialiased lines

I have a problem when joining two antialiased lines when using a blending mode, I get a dip at the point where they join. By blending mode I mean that I draw my antialiased line by calculating the ratio of line colour vs background colour, so when…
Michel Rouzic
  • 1,013
  • 1
  • 9
  • 22
8
votes
6 answers

What algorithm is behind the Gimp's "Color to Alpha" feature?

For those who aren't familiar with the Gimp's "Color to Alpha" feature yet, here is the page on it from the Gimp's documentation: Color to Alpha. It does a really good job, and I wonder much how exactly Gimp does it in terms of color manipulation,…
Desmond Hume
  • 8,037
  • 14
  • 65
  • 112
8
votes
1 answer

General algorithm for rastering vector image

What is the general algorithm of rasterizing vector image? I've found a lot of algorithms of rasterizing primitives such as lines, circles, Bezier curves etc. But for general, what should I do? Simply, go foreach vector figure in vector picture, get…
medvedNick
  • 4,512
  • 4
  • 32
  • 50
6
votes
2 answers

ploting artefact with points over raster

I noticed some weird behavior when resizing the plot window. Consider library(sp) library(rgeos) library(raster) rst.test <- raster(nrows=300, ncols=300, xmn=-150, xmx=150, ymn=-150, ymx=150, crs="NA") sap.krog300 <-…
Roman Luštrik
  • 69,533
  • 24
  • 154
  • 197
6
votes
2 answers

Creating raster images using R

I am trying to use R to create a raster image from a matrix of data. However, I am getting some weird artifacts on the edge of my image. The code I am using is as follows: # From the example for rasterImage(). A 3 pixel by 5 pixel b/w…
Sharpie
  • 17,323
  • 4
  • 44
  • 47
5
votes
0 answers

Rasterize plot when using PDF output device

Hello everybody out there using R, When putting multiple plots with thousands of data points into a single PDF file, this file can get huge and take a long time to open. The following post describes exactly the same problem in Matplotlib, as well as…
NicolasBourbaki
  • 853
  • 1
  • 6
  • 19
5
votes
3 answers

Contour of a run-length-coded digital shape

A digital shape is a set of connected pixels in a binary image (a blob). It can be compactly represented by run-length coding, i.e. grouping the pixels in horizontal line segments and storing the starting endpoint coordinates and the lengths.…
user1196549
5
votes
3 answers

Producing a raster plot in R

I'm trying to produce a raster graph (like a hovmoller diagram) and was hoping someone might help. I've looked at the help with rasterVis and some others but can't seem to get their examples to suit my data, which probably needs transforming in some…
JonP
  • 81
  • 1
  • 4
4
votes
1 answer

How to interpret the pixel array in a 1 bpp BMP file

I can't find a way to explain the pixel array in the following situation: I created a BMP image 2x2 pixels with MS Paint on Windows 7. Saved it as monochrome BMP (which I think means BMP with color depth 1 bit per pixel) This is how the image looks…
Viktor Nonov
  • 1,472
  • 1
  • 12
  • 26
2
votes
3 answers

Antialiasing alternatives

I've seen antialiasing on Windows using GDI+, Java and also that provided by Photoshop and Gimp. Are there any other libraries out there which provide antialiasing facility without depending on support from the host OS?
Agnel Kurian
  • 57,975
  • 43
  • 146
  • 217
2
votes
1 answer

Can I use ROPs in Canvas? (I care for performance reasons only)

So... In the good old days of making games, when you were drawing sprites to the screen, you'd use ROPs to draw only the "non-transparent" part of your sprite. (Yes, I haven't done any game coding in a loooong time) (In case you have no idea what…
Daniel Magliola
  • 30,898
  • 61
  • 164
  • 243
2
votes
2 answers

Reverse Bresenham algorithm? How to convert array of drawn pixels into coordinates

Does there exist an algorithm that can analyze an array of pixel coordinates, and return an array of line coordinates that, when drawn using Bresenham's algorithm, would generate lines that cover the same pixels as the original array? One use case…
2
votes
0 answers

How would I convert a raster image to a usable format like jpg?

I have an obscure raster image file format called RVG. It is created from Kodak's carestream sensor. I want to be able to open it for viewing through web software(ruby/rails). We have RMagic installed and use it for other images but this format is…
Peter Black
  • 1,142
  • 1
  • 11
  • 29
2
votes
0 answers

PCL: printing out partial page without ejecting

I want to be able to make my printer (HP DeskJet 1280 on USB) print out all raster data I have sent to it so far, without ejecting the page. I am sending only plain raster graphics and cursor positioning commands — no vector graphics, no text. More…
toomas
  • 520
  • 5
  • 15
2
votes
2 answers

DirectX11 pixel shader in pipeline is missing

I'm writing a program which displays a MS3D model using DirectX, and unfortunately, the result shows nothing on the screen. When I use the Graphics Debugger from Visual Studio 13, I notice that the pixel shader is missing from the pipeline, as it…
khanhhh89
  • 317
  • 5
  • 19
1
2 3