ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCOMP3145Bitmaps Pixel Maps
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    COMP3145

    HCI & Computer Graphics

    Progress0 / 73 done
    Topics73
    1Input-output channels2Human memory3Thinking, Reasoning, Problem solving4Emotions and Individual differences5Psychology and design of interacting systems
    6Text entry devices7Positioning, Pointing, and drawing devices8Display devices9Devices for virtual reality and 3D interaction10Physical controls, Sensors and special devices11Paper printing and scanning12Memory, Processing and networks
    13Models of interaction14Frameworks and HCI15Ergonomics16Interaction styles17Elements of the WIMP interfaces18Interactivity and Context of interaction
    19Introduction20Paradigms for interaction
    21What is design22Process of design and User focus23Navigation design24Screen design and layout25Iteration and prototyping
    26Software life cycle27Usability engineering28Iterative design and prototyping29Design rationale30Design rules and Guidelines31Golden rules and heuristics32HCI patterns33Evaluation techniques and methods34Task analysis35Universal design36User support systems37Computer Supported Cooperative Work38Groupware systems39Implementation of synchronous groupware40Ubiquitous computing41History of Computer Graphics42Graphics architectures and software
    43Pinhole camera, Human vision, Synthetic camera44Modeling vs. rendering45OpenGL Architecture46Displaying simple two-dimensional geometric objects47Positioning systems and windowed environment48Color perception and models49RGB, CMY, HLS color models50Color transformations
    51RGB and indexed color
    52Network environment and client-server computing
    53event, sample and request input54Using callbacks and picking
    55translation, rotation, scaling, shear56Homogeneous coordinates and concatenation57Current transformation and matrix stacks
    58Classical viewing59Specifying views in 3D60Affine transformation in 3D61Projective transformations62Ray tracing
    63Illumination and surface modeling64Phong shading model65Polygon shading
    66Line drawing via Bresenham's algorithm67Clipping and polygonal fill68BitBlt operations69Hidden surface removal (z buffer)
    70Buffers71Reading and writing bitmaps and pixel maps72Texture mapping73Compositing
    3 min read
    Topic 71 of 73
    Topic Study Note Illustration
    71

    Reading and writing bitmaps and pixel maps

    Bitmaps and pixel maps are digital representations of images where each pixel’s color value is stored in memory .

    1. Definition

    Bitmaps and pixel maps are digital representations of images where each pixel’s color value is stored in memory.

    • Bitmap (BMP): A simple image format storing pixels in a grid, row by row.
    • Pixel map (pixmap): A general term for any image representation that stores color values for each pixel.

    Reading and writing refers to the process of importing image data into memory and exporting it from memory to storage or display.


    2. Structure of Bitmaps

    2.1 Bitmap Components

    A standard bitmap image consists of:

    1. Header

      • Contains information like image width, height, color depth, and compression.
    2. Color Table (optional)

      • Used in indexed color bitmaps (e.g., 8-bit images).
      • Maps pixel indices to actual RGB color values.
    3. Pixel Data

      • Stores the color information for each pixel.
      • Usually stored row by row (bottom-to-top in BMP files).

    2.2 Pixel Representation

    • Each pixel can be represented in different ways:

      • Monochrome: 1 bit per pixel (black/white)
      • Grayscale: 8 bits per pixel
      • RGB color: 24 bits per pixel (8 bits each for Red, Green, Blue)
      • RGBA: 32 bits per pixel (includes alpha for transparency)

    3. Reading a Bitmap

    To read a bitmap into memory:

    1. Open the file in binary mode.
    2. Read the header to get image dimensions and color depth.
    3. Read the color table (if indexed colors are used).
    4. Read pixel data into a 2D array or pixel buffer.
    5. Optional conversion to internal representation for processing.
    • Example in pseudocode:
    open("image.bmp", "rb")
    read header -> width, height, color depth
    read color table (if exists)
    for each row:
        read pixel data into array
    

    4. Writing a Bitmap

    To write a bitmap from memory:

    1. Create a header with image size, width, height, and color depth.
    2. Write the header to the file.
    3. Write the color table (if indexed).
    4. Write the pixel data from memory row by row.
    • Example in pseudocode:
    open("output.bmp", "wb")
    write header
    write color table (if needed)
    for each row in pixel array:
        write pixel data to file
    

    5. Pixel Maps (Pixmaps)

    • A pixel map is similar to a bitmap but may use other formats like PNG, TIFF, or custom pixel buffers.

    • Reading/Writing pixel maps involves:

      • Loading pixel values into memory
      • Manipulating pixels
      • Saving the modified pixels back to disk or display

    6. Applications

    1. Image editing software (Photoshop, GIMP)
    2. Rendering engines for textures in 2D/3D graphics
    3. Graphics file conversion between formats
    4. Game development for sprites and textures

    7. Summary Table

    Operation Purpose Key Steps
    Reading bitmap Load image into memory Read header → Color table → Pixel data
    Writing bitmap Save image from memory Create header → Write color table → Write pixel data
    Pixel map General image buffer Store/modify pixels for rendering

    Key Points:

    • Bitmaps/pixel maps store pixel-by-pixel color information.
    • Reading involves loading header, color table, and pixels.
    • Writing involves creating a file with proper header and pixel data.
    • They are foundational for 2D graphics, textures, and image processing.
    ← Previous topic 70
    Discrete Techniques: Buffers
    Next topic 72 →
    Texture mapping

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    3mremaining
    490words
    Beginnerlevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    HCI & Computer Graphics