Method to view machine or assembly code supporting a raster or vector image

07
2014-07
  • Marcintosh

    I'd like to be able to view either code for a selected image. For example, if I have an image of a flower, what does it look like to the machine or how would the machine express it using it's machine or binary's code.

    I've been looking for an answer on Google and DogPile and several other searches but can't come up with it. Any ideas are greatly appreciated.

  • Answers
  • Doktoro Reichard

    An image in itself has no executable instructions inside. It's a piece of information, a set of bits and bytes that are usually compressed. Decompressed, it results in a bitmap. That bitmap can then be translated through any image processor into the colored pixels one sees on a display.

    A vector image is different from a raster image, in the sense that the format itself defines some instructions, that are later calculated by the software. An example of it is SVG (Scalable Vector Graphics).

    However, there is no single consensus on how to present images. For instance, you can use either the GPU or the CPU in order to process the information (which will entail different assembly instructions), there exists a countless number of languages, and any one might produce different assembly instructions, although they do the same visually.


  • Related Question

    graphics - Best way to describe vector vs raster
  • Travis

    Many times at work, someone will ask me if they can get an image (company logo, for example) in EPS or SVG format. They assume that since I put the image on the company site, that I could easily convert it to the format they need and send it to them.

    Obviously, the problem is that the original image is a raster format and they're asking for a vector image. I often find myself having trouble explaining why I can't fill their request. Especially without giving a bunch of technical terms that I'd have to explain.

    I'm not looking for an answer on how to convert JPG to SVG or similar but rather an easy-to-understand explanation of why the process isn't as straightforward as it seems.

    Please help me straighten this out. Thanks!


  • Related Answers
  • hyperslug

    I always say

    Raster records the pixels in the picture.

    Vector records the steps it took to draw the picture.

    So if you enlarge Raster you get a big picture with big pixels. If you enlarge Vector the computer follows the steps to redraw at higher resolution.


    If you have a chance to demo it for them, load up Word and put in 1 small (raster) image and 1 clip art. Then drag the corners to show what happens. You could even print out the before/after and hang it on your cube so you have something to point to.

  • Grant

    In layman's terms.

    Raster (I usually just say "bitmap" though) images record the colors in order. Blue, blue, blue, light blue, light blue, light blue... (At this point i'm pointing at a nearby object and reading colors on the top, left to right).

    Vector image is a description about an image. "A light blue circle 12cm across. A solid blue background.

    Then I explain how Rasters are better for photographs because that's how cameras and scanners see the image anyway, and Vectors are better for illustrations because you can make it any size without losing detail.

  • Kevin Panko

    Vector graphics are to the etch-a-sketch, as raster graphics are to a mosaic.

  • Axxmasterr

    The main difference between a vector graphic versus a rasterized graphic is one is a coordinate based representation of what the object should look like. Flash animations are a good example of a vectorized graphics. A digital image is a perfect example of a rasterized image as it has a specific resolution. Scaling up the two is clearly illustrative of the differences. Vectorized graphics will scale without losing any detail as they are coordinate based. Rasterized images scale up and the pixels will become more appearant as the pixels become larger and larger.

    True Type fonts are a good example because they scale to any size and look fine, when you use the fixed pitch system font you will noticed the pixilation as you increase the size.

  • Јοеу

    Vector images consist of lines and curves. In general they are shapes with outline and fill and with that you compose everything else. Because you specify shapes in terms of mathematical equations they scale well and look the same in every resolution or size.

    Raster images on the other hand consist of a regular grid of pixels each of which has a color. Changing the size of the image degrades its quality as you only have the original pixel grid as a starting point.

    Converting from raster to vector basically means you'd have to try to find out what shapes can be used to approximate the look that was achieved with the raster image. For straight lines this is usually straightforward, but for curves and similar the process gets a little more complicated to get the look right.

    Also it gets much harder if the raster image only has low resolution, such as on the web.

  • Kenneth Cochran

    A raster image is like a paint-by-numbers picture you played with as a kid. Each pixel is assigned a number representing a color and the computer just fills in all the pixels to display it.

    A vector image is like asking an artist to write down all the steps he takes to create a painting. He records every brush stroke by its location on the canvas, its shape, direction and size. Another artist can then follow the instructions to reproduce the same painting.

    A computer is very good with numbers so it can reproduce either type of image with ease but turning a raster image into a vector image is like asking an artist to take a grid of numbers and a color pallet, determine what shapes the numbers represent and then record the brush strokes he would have used to create them.

    Anyone can fill in a paint by numbers picture but what shapes and brush strokes it would take to create the same picture is open to interpretation. A good artist could get close but it would never be exact.

    A computer can do no better than an artist. It can create smaller, more detailed brush strokes than even the most talented artist but it is actually far worse at recognizing complex shapes. So the best it can do is a close approximation.

  • Mike McQuaid

    Just explain to them that there are two different ways of storing images and yours is the other way.