Questions tagged [graphics]

Graphics are visual presentations. Questions using this tag should also be tagged with the appropriate language and graphics subsystem in use. For more general graphics questions, consider Computer Graphics Stack Exchange (computergraphics.stackexchange.com).

Graphics

The tag should be assigned to questions about constructing, displaying and manipulating visual presentations. Questions should also be tagged with the appropriate language and graphics subsystem in use. For more general graphics questions, consider Computer Graphics Stackexchange.

While historically there were two parallel developments of vector and raster (bitmap) systems, modern systems all implement the raster model at the hardware layer but may use extensive applications of vector graphics techniques at higher levels. The entire chain through the various levels to go from model to picture on screen is known as the pipeline.

The Borland Graphics Interface (graphics.h) has its own tag:

Examples

Construction:

  • How to turn raw data into a bitmap?
  • How to generate a chart, how to draw using vectors?
  • How to load a .3ds file and display the model?

Displaying

  • How to display a large bitmap scaled down?
  • How to use an image as a texture for a control?
  • How to ray-trace voxel data?

Manipulating

  • How to modify images using common effects such as filters?
  • How to create animations?

Counterexamples

  • How to draw using a paint program? --> too basic, not programming related
  • How to take a picture when there is not enough light? --> see Photography
  • How to scan a pencil drawing? --> software tools, see SuperUser
  • What graphics card should I buy? --> shopping questions are off-topic on most SE sites

Resources

Free Graphics Programming Books

20510 questions
48
votes
4 answers

Best way to do non-flickering, segmented graphics updates in Delphi?

I thought I could just throw this out there and just ask: I have seen Delphi controls that are flawless in terms of graphical effects. Meaning: no flickering, sectioned updates (only redraw the section of a control that is marked as dirty) and…
Jon Lennart Aasenden
  • 3,920
  • 2
  • 29
  • 44
47
votes
5 answers

How to Change Font Size in drawString Java

How to make the font size bigger in g.drawString("Hello World",10,10); ?
zbz.lvlv
  • 3,597
  • 6
  • 34
  • 38
47
votes
7 answers

Fast work with Bitmaps in C#

I need to access each pixel of a Bitmap, work with them, then save them to a Bitmap. Using Bitmap.GetPixel() and Bitmap.SetPixel(), my program runs slowly. How can I quickly convert Bitmap to byte[] and back? I need a byte[] with length = (4 * width…
AndreyAkinshin
  • 18,603
  • 29
  • 96
  • 155
46
votes
6 answers

Quaternions vs. Euler Angles

Hi What is the pros and cons of "Quaternions" and "Euler Angles" Method - Which one is faster? - Which one need less Computational Effort? - which one is more accurate, (in round off error)?
mrbm
  • 1,136
  • 1
  • 12
  • 36
46
votes
4 answers

Android Graphics Internals

I haven't found a clear explanation on how the Android graphics system works, specifically, does it use a display server, is it based on DirectFB or X11, etc. From what I've managed to piece together, Android depends on the Linux frame buffer. I…
naasking
  • 2,514
  • 1
  • 27
  • 32
46
votes
14 answers

Screenshot of the Nexus One from adb?

My goal is to be able to type a one word command and get a screenshot from a rooted Nexus One attached by USB. So far, I can get the framebuffer which I believe is a 32bit xRGB888 raw image by pulling it like this: adb pull /dev/graphics/fb0…
Marcus
  • 2,021
  • 2
  • 21
  • 20
45
votes
10 answers

Javascript drawing library?

Any suggestion for a JavaScript interactive drawing library? Just need to draw lines, polygons, texts of different colors. IE/Firefox/Opera/Safari compatible. ­­­­­­­­­­­­­­­­­­­­­­­­­­
st.
  • 593
  • 1
  • 5
  • 12
45
votes
1 answer

How to center an annotation horizontally over a point?

I'd like to take something like this code for scatter plot annotations... import matplotlib; matplotlib.use('TkAgg') import matplotlib.pyplot as plt labels = ["Abra", "Kadabra", "Alazkazam", "Mew"] x_values = [0.3, 0.6, 0.2, 0.4] y_values = [0.2,…
legel
  • 2,507
  • 3
  • 23
  • 22
45
votes
3 answers

Convert a quadratic bezier to a cubic one

What is the algorithm to convert a quadratic bezier (with 3 points) to a cubic one (with 4 points)?
jmasterx
  • 52,639
  • 96
  • 311
  • 557
45
votes
2 answers

How to fill a Path in Android with a linear gradient?

Given a closed Path object result is like this: Although that is a rectangle I'm looking for something which works with any closed Path.
Carl Whalley
  • 3,011
  • 8
  • 33
  • 48
44
votes
5 answers

In MATLAB, how do I plot to an image and save the result without displaying it?

This question kind of starts where this question ends up. MATLAB has a powerful and flexible image display system which lets you use the imshow and plot commands to display complex images and then save the result. For example: im =…
Joe Soul-bringer
  • 3,294
  • 5
  • 31
  • 37
44
votes
4 answers

How to concatenate icons into a single image with ImageMagick?

I want to use CSS sprites on a web site instead of separate image files, for a large collection of small icons that are all the same size. How can I concatenate (tile) them into one big image using ImageMagick?
Peter Hilton
  • 17,211
  • 6
  • 50
  • 75
44
votes
9 answers

How to best approximate a geometrical arc with a Bezier curve?

When drawing an Arc in 2D, using a Bezier Curve approximation, how does one calculate the two control points given that you have a center point of a circle, a start and end angle and a radius?
Mike Caron
  • 5,674
  • 4
  • 48
  • 71
44
votes
4 answers

Is storing Graphics objects a good idea?

I'm currently in the process of writing a paint program in java, designed to have flexible and comprehensive functionalities. It stemmed from my final project, that I wrote overnight the day before. Because of that, it's got tons and tons of bugs,…
Zizouz212
  • 4,908
  • 5
  • 42
  • 66
44
votes
4 answers

Graphics on indexed image

I am getting error: "A Graphics object cannot be created from an image that has an indexed pixel format." in function: public static void AdjustImage(ImageAttributes imageAttributes, Image image) { Rectangle rect = new Rectangle(0, 0,…
Krivers
  • 1,986
  • 2
  • 22
  • 45